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(2e-4)").sage()
2.0*b - 4
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
2) Long floats:
Though Maxima does not understand directly "l" as an exponential sign, we
get the current output:
sage: maxima("spherical_bessel_j(100,10.1)")
15.696490570126766l-90
turns into
sage: spherical_bessel_J(100,10.1)
15.6964905701*l - 90
with the same nasty consequences.
I have traced the issue down to
"sage.calculus.calculus.symbolic_expression_from_maxima_string" at
"calculus/calculus.py", for which, a couple of lines before, a regular
expression is defined to deal with scientific notation:
sci_not = re.compile("(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]\d+)")
I guess the issue would be solved by adding "lLbB" to the regular
expression, but I am not sure if it would break anything. I didn't have
time to test yet.
Should I open a ticket and investigate it further? Or can any one tell the
origin of the problem is completely different, or it should be treated some
other way?
Cheers,
Jesús Torrado
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.