maxima-eval (version 5.26) : extra (false) in output

10 views
Skip to first unread message

Dima Pasechnik

unread,
Feb 27, 2012, 8:37:03 PM2/27/12
to sage-...@googlegroups.com
In Maxima 5.26, one gets

sage: from sage.libs.ecl import *
sage: ecl_eval('(with-output-to-string (*standard-output*) (maxima-eval #$disp(1+1)$))')
<ECL: "(false) 2

">

rather than 
sage: from sage.libs.ecl import *
sage: ecl_eval('(with-output-to-string (*standard-output*) (maxima-eval #$disp(1+1)$))')
<ECL: "2

">

This gives  (Sage 5.0.beta5 with Maxima 5.26 spkg from #10682):

sage -t  --long -force_lib devel/sage/sage/interfaces/maxima_lib.py
#0: simplify_sum(expr='sum(q^k,k,0,inf))
#1: simplify_sum(expr=a*'sum(q^k,k,0,inf))
**********************************************************************
File "/mnt/usb1/scratch/dima/sage-5.0.beta5/devel/sage-main/sage/interfaces/maxima_lib.py", line 236:
    sage: stdout_to_string('disp(1+1)')
Expected:
    '2\n\n'
Got:
    '(false) 2\n\n'
**********************************************************************
1 items had failures:
   1 of   6 in __main__.example_5

Any idea why this happens?
Thanks,
Dima



Nils Bruin

unread,
Feb 28, 2012, 1:54:39 AM2/28/12
to sage-devel
On Feb 27, 5:37 pm, Dima Pasechnik <dimp...@gmail.com> wrote:
> In Maxima 5.26, one gets
>
> sage: from sage.libs.ecl import *
> sage: ecl_eval('(with-output-to-string (*standard-output*) (maxima-eval
> #$disp(1+1)$))')
> <ECL: "(false) 2
>
> ">
Yes, this is apparently just what maxima 5.26 does:

Maxima 5.26.0 http://maxima.sourceforge.net
using Lisp ECL 11.1.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) display2d: false;

(%o1) false
(%i2) disp(1+1);

(false) 2

(%o2) done

This is
http://sourceforge.net/tracker/index.php?func=detail&aid=3484414&group_id=4933&atid=104933

A fix has already been committed:

http://maxima.git.sourceforge.net/git/gitweb.cgi?p=maxima/maxima;a=blobdiff;f=src/comm.lisp;h=94c382362dbdf9f8f7acd7c538e17b0537a6493a;hp=1282784c93d381b3dfbb6d8bc54b2b0d853ad7df;hb=9bf2c507c8875e26ea9ce9d206cbf97e0b5ae8f8;hpb=a4293f6b97a5b5e310f70f16a73e14e72f39a67b

Reply all
Reply to author
Forward
0 new messages