On 02/05/15 12:04, Julien Puydt wrote:
Le 04/02/2015 23:40, François Bissey a écrit :
On 02/05/15 11:30, Julien Puydt wrote:
Le 04/02/2015 21:33, François Bissey a écrit :
Maxima is a funny beast that can be compiled against several lisp at
the same time. Just adding "--enable-ecl" to the debian rule probably
means that a maxima based on ecl will be built and installed alongside
whatever debian is already installing by default.
Everything that communicates with maxima-lib should be fine. For the
direct interface to maxima you may want to do
# run maxima with ecl
sed -i "s:'maxima :'maxima -l ecl :g" \
sage/interfaces/maxima.py \
sage/interfaces/maxima_abstract.py
Francois
Yes, maxima is an extremely impressive piece of software.
Still, the maxima-on-gcl in debian should give good results too : there
is a common lisp specification behind in both cases. The fact that some
doctests seem to fail because there are missing/differing decimals is a
little worrying, and I opened a bug to the maxima package to discuss the
matter (bug #777072).
Sure but the interface may look broken. We adjust maxima output to what
maxima with ecl does.
Example:
fbissey@QCD-nzi3 ~ $ maxima
Maxima 5.35.1 http://maxima.sourceforge.net
using Lisp CLISP 2.49 (2010-07-07)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1)
fbissey@QCD-nzi3 ~ $ maxima -l ecl
;;; Loading #P"/usr/lib64/ecl-13.5.1/sb-bsd-sockets.fas"
;;; Loading #P"/usr/lib64/ecl-13.5.1/sockets.fas"
;;; Loading #P"/usr/lib64/ecl-13.5.1/defsystem.fas"
;;; Loading #P"/usr/lib64/ecl-13.5.1/cmp.fas"
Maxima 5.35.1 http://maxima.sourceforge.net
using Lisp ECL 13.5.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1)
Notice the four extra lines. If I use clisp instead of ecl my results
may get mowed. May be you are lucky and gcl gives the same number of
lines. Alternatively you can adjust the maxima interface to adjust
for gcl.
This question of mowed results is intriguing.
Indeed, among the failing doctests, I have:
(Exhibit 1)
File "src/sage/functions/other.py", line 1857, in
sage.functions.other.Function_
arg.__init__
Failed example:
maxima(arg(sqrt(2)+i))
Expected:
atan(1/sqrt(2))
Got:
<BLANKLINE>
(Exhibit 2)
But also places where sage expects some result and instead gives an
error "TypeError: unable to convert '' to an integer".
(Exhibit 3)
Failed example:
limit(x^a,x=0)
Expected:
Traceback (most recent call last):
...
ValueError: Computation failed since Maxima requested additional
constraints; using the 'assume' command before evaluation *may* help
(example of legal syntax is 'assume(a>0)', see `assume?` for
more details)
Is a an even number?
Got:
<BLANKLINE>
Traceback (most recent call last):
(indeed a blank line confused sage)
(Exhibit 4)
Failed example:
maxima.example('arrays')
Expected:
a[n]:=n*a[n-1]
a := n a
n n - 1
a[0]:1
a[5]
120
a[n]:=n
a[6]
6
a[4]
24
done
Got:
n n - 1
(%i1)
a[0]:1
(%i1)
a[5]
120
(indeed two lines look like they've been eaten)
Your remark makes me think there are indeed places where the maxima
output isn't parsed like I would expect (pun intended).
Typical failures... You may want to look at
sage/interfaces/maxima_abstract.py
under "def _commmand_runner"
Francois
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.