[Openmcl-devel] Wrong multiplication

Gary Byers gb at clozure.com
Fri Jan 4 07:03:38 PST 2013



On Fri, 4 Jan 2013, Waldek Hebisch wrote:

> Welcome to Clozure Common Lisp Version 1.9-dev  (LinuxARM32)!
> ? (* 9126805504 -536870912)
> -3229880371730448384
> ?
>
> The result is incorrect, the correct answer is -489991639457909964

I think that the correct answer is actually -4899916394579099648 (e.g,
the last digit above got lost somewhere.)  It's clearly not what *
is saying it is, either ...

The good news: this also doesn't seem to be ARM-specific; as far as
I can tell,

(* most-negative-fixnum some-bignum) ; either arg order

will produce an incorrect result on all architectures that CCL runs on.
(The incorrect result will also likely differ on each invocation.)

The bad news: this bug has likely been around forever.

It should be fixed in the trunk now.

>
> This is revision 15558 recompiled to use hardware floats on
> Raspberry Pi.
>
> --
>                              Waldek Hebisch
> hebisch at math.uni.wroc.pl
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list