[sage-support] Re: Bug in evaluation of Maxima numbers? Or where? Or not a bug at all?

2013-07-22 Thread Nils Bruin
On Monday, July 22, 2013 6:36:04 PM UTC+2, Jesus Torrado wrote: > > So the "b" as an exponential sign is treated as a variable, producing some > funny behaviour: > > sage: maxima("2*bfloat(2e-4)").sage() > 4.0*b - 4 > sage: 2*maxima("bfloat(2e-4)").sage() > 4.0*b - 8 > That's inde

[sage-support] Re: Bug in evaluation of Maxima numbers? Or where? Or not a bug at all?

2013-07-22 Thread Jesús Torrado
Hi all, Coming from: https://groups.google.com/forum/#!topic/sage-support/vv6yvZMVFAQ Thanks, Rob! So it seems Sage does not interpret correctly some Maxima numbers. In particular, I have noticed two issues: 1) Big floats: sage: maxima("bfloat(2e-4)") 2.0b-4 sage: maxima("bfloat(

[sage-support] Re: Bug in evaluation of Maxima numbers? Or where? Or not a bug at all?

2013-07-19 Thread Robert Dodier
On 2013-07-19, Jesús Torrado wrote: > sage: maxima('spherical_bessel_j(50,9.5)') > 18.003620332195756l-33 > sage: spherical_bessel_J(50,9.5, algorithm=3D"maxima") # default algori= > thm > 18.0036203322*l - 33 Common Lisp allows four float types -- short, single, double, and lon

[sage-support] Re: Bug in evaluation of Maxima numbers? Or where? Or not a bug at all?

2013-07-19 Thread Jesús Torrado
After some investigation, I can think of two possible solutions: 1. Changing the code of "spherical_bessel_J" in sage/functions/special.py from return meval("spherical_bessel_j(%s,%s)"%(ZZ(n),var)) to return meval("float(spherical_bessel_j(%s,%s))"%(ZZ(n),var)) 2. Change the return value of Ma

[sage-support] Re: Bug in evaluation of Maxima numbers? Or where? Or not a bug at all?

2013-07-19 Thread Jesús Torrado
More info on the wrong evaluation from Maxima: This seems to be happening when the second argument of spherical_bessel_J is an RR, but not if it is in ZZ o QQ. On Friday, July 19, 2013 12:18:51 PM UTC+2, Jesús Torrado wrote: > > Hi there, > > Have a look at the second line: > > sage: maxima