#11643: Maxima precision
---------------------------+------------------------------------------------
Reporter: eviatarbach | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-4.7.2
Component: interfaces | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
---------------------------+------------------------------------------------
Comment(by nbruin):
I have added a patch that can be applied on top of 4.7.1, that tries to
preserve precision when translating back and forth between SR and
maxima_lib. (not the string-level conversions; only the routines that are
now used for integrate and limit). However, it looks like Maxima itself
does not try to preserve precision at all with its bigfloats. Any
arithmetic defaults to the set precision. So trying to preserve precision
is not going to be very useful. At the very least, fpprec should be set
appropriately every time. Evidence in the transcript below:
{{{
sage: M=sage.calculus.calculus.maxima
sage: from sage.interfaces.maxima_lib import *
sage: a=12345.6789012345678
sage: a.sign_mantissa_exponent()
(1, 868749920300559282, -46)
sage: a.prec()
60
sage: b=sr_to_max(SR(a))
sage: b
<ECL: ((BIGFLOAT SIMP 60) 868749920300559282 14)>
sage: M(b)
1.2345678901234568b4
sage: c=M(b)+M(b)
sage: c.ecl()
<ECL: ((BIGFLOAT SIMP 56) 54296870018784955 15)>
sage: sr_to_max(SR(2*a))
<ECL: ((BIGFLOAT SIMP 60) 868749920300559282 15)>
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11643#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.