On 11/26/08, David Ronis <ronis at ronispc.chem.mcgill.ca> wrote:
> (%i1) :lisp (gamma-lanczos (+ 1 (/ #c(10d0 0d0) 2)));
> #C(119.99999999999996 0.0)
I tried double_factorial(10.0) on cvs Maxima + Clisp and + CMUCL.
It appears the calculation of GAMMA-LANCZOS is different,
and that accounts for the closeto failure with Clisp.
Maxima passes the test w/ CMUCL.
Maxima + Clisp 2.46:
:lisp (gamma-lanczos #C(6.0 0.0)) => #C(119.99999999999996 0.0)
Maxima + CMUCL 19c:
:lisp (gamma-lanczos #C(6.0 0.0)) => #C(119.99999999999997 0.0)
I can't tell why GAMMA-LANCZOS returns a different result.
It is just computing some terms from a table of coefficients and
adding them up --- maybe it is a question of rounding mode or
something like that. (The coefficients are parsed the same ---
I checked that. That's reassuring, I guess.)
I wish we could get all Lisp varieties to act the same wrt floating
point calculations. Sigh.
FWIW
Robert Dodier