[Openmcl-devel] Wrong floating-point result.

Gary Byers gb at clozure.com
Sun Sep 12 10:13:06 PDT 2010


It's a compiler bug (and AFAIK it's specific to x8664).  If
you replace the one use of the DIV-DF macro with a call to /,
the symptom goes away; when the division's open-coded, the
compiler needs to save a register around the FUNCALL in the
second operand (or realize that it can process the operands
in reverse order in this case) but neglects to do either of
those things.

On Sun, 12 Sep 2010, Waldek Hebisch wrote:

> When using Closure CL (Clozure Common Lisp Version 1.5-r13651
> (LinuxX8664)!) after compiling and loading the attached file
> I get:
>
> ? (|ACPLTTS;newtonApprox1;Sup2Df;1| pol 1.6543999999999996d0 vv)
> 0.6543999999999996D0
>
> which is wrong.  Using other Lisp, like sbcl I get the correct
> result, that is 1.4853058451606995d0.
>
> I wonder if this is related to the recently fixed stack-return
> bug.
>
> --
>                              Waldek Hebisch
> hebisch at math.uni.wroc.pl
>



More information about the Openmcl-devel mailing list