CCing to debian-sage.
Ondrej
Last time I tried using a maxima compiled with sbcl (1.0.9 ?) with sage
on Gentoo, sage couldn't call maxima. The lisp engine just didn't allow
for it. It may be that it is possible but need some tuning with the
compilation options. I am currently forbiding the building of maxima with
sbcl for sage on Gentoo.
The current maxima ebuild will have to be modified to allow building against
ecl but it should be possible.
Francois
I ran a full Sage test suite after building and installing the new maxima
package, and things seem to work about as well as they did with the old
one. Some tests fail due to different rounding policies between Maxima
with clisp (what Sage uses) and with other lisps (example below); this is
an old issue.
**********************************************************************
File "/home/tabbott/.sage/tests/calculus.py", line 3141:
sage: f.find_minimum_on_interval(1, 5)
Expected:
(-3.2883713955908962, 3.42561846957)
Got:
(-3.2883713955908962, 3.425618469566611)
**********************************************************************
But I get one case where the answer is completely different.
sage -t devel/sage/sage/calculus/calculus.py
**********************************************************************
File "/home/tabbott/.sage/tests/calculus.py", line 2596:
sage: f.nintegrate(x,0,1)
Expected:
(-480.00000000000011, 5.3290705182007538e-12, 21, 0)
Got:
(-831.99999999999989, 9.237055564881304e-12, 21, 0)
**********************************************************************
However, I don't think we should be concerned, since the answer is
actually supposed to be basically 0 and this doctest is intended to be a
demonstration of the problems with using floats everywhere.
So, I don't think that the new Maxima will be a problem for Sage.
(the relevant section of calculus.py responsible for that test is below)
-----------------------------------------------------------------
Note that in exotic cases where floating point evaluation of
the expression leads to the wrong value, then the output
can be completely wrong:
sage: f = exp(pi*sqrt(163)) - 262537412640768744
Despite appearance, $f$ is really very close to 0, but one
gets a nonzero value since the definition of \code{float(f)} is
that it makes all constants inside the expression floats, then
evaluates each function and each arithmetic operation
using float arithmetic:
sage: float(f)
-480.0
Computing to higher precision we see the truth:
sage: f.n(200)
-7.4992740280181431112064614366622348652078895136533593355718e-13
sage: f.n(300)
-7.49927402801814311120646143662663009137292462589621789352095066181709095575\
681963967103004e-13
Now numerically integrating, we see why the answer is wrong:
sage: f.nintegrate(x,0,1)
(-480.00000000000011, 5.3290705182007538e-12, 21, 0)
It is just because every floating point evaluation of return
-480.0 in floating point.
-----------------------------------------------------------------
-Tim Abbott