On Wednesday, September 10, 2014 11:02:05 AM UTC-7, Stein William wrote:
>
> Hi, 
>
> Bill Page reported this issue, which I'm copying here to the 
> sage-support list, in the hopes somebody will look into it: 
>
> sage: var('k, l') 
> sage: f = real(cosh(sqrt(1/2*k-1/2*sqrt(k^2+4l)))) 
>

The problem is in this line. It should be

sage: f = real(cosh(sqrt(1/2*k-1/2*sqrt(k^2+4*l))))

in which case no problem arises. Unfortunately, 4l is valid python2 syntax, 
leading to the "long" with repr "4L". Simplify_full apparently converts 
this to maxima by just sending the repr over, at which point maxima's 
reader chokes (because "4L" is not valid maxima syntax).

sr_to_max has no issue:

sage: from sage.interfaces.maxima_lib import *
sage: sr_to_max(SR(4L))
<ECL: 4>
sage: maxima_calculus(SR(4L))
TypeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.

If we want to support python longs in the maxima-interface we should 
probably make the translator aware of them. Also note:

sage: str(4L)
'4'
sage: str(SR(4L))
'4L'

(there may be good reasons why str on SR uses __repr__ on its leafs, 
though).

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to