#9263: airy_ai yields wrong results in arbitrary precision
------------------------------------+---------------------------------------
Reporter: zimmerma | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone: sage-5.10
Component: basic arithmetic | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Comment (by eviatarbach):
There appear to be two different problems related to numerical evaluation
with Maxima. First, that some functions are locked to float precision. In
Maxima:
{{{
(%i15) airy_ai(bfloat(%pi)),fpprec:20;
(%o15) airy_ai(3.1415926535897932385b0)
}}}
I think it's returning unevaluated because `airy_ai` doesn't know how to
operate on `bigfloat`s.
Other functions do know how to operate on `bigfloat`s:
{{{
(%i18) bfloat(spherical_bessel_j(4, bfloat(%pi))),fpprec:200;
(%o18)
6.471630031847746208103870635408583211756194941699504852294921875b-2
}}}
But, the interface is losing precision:
{{{
sage: spherical_bessel_J(4, pi.n(digits=1000)).n(digits=100)
0.06471630031847745712081376723290304653346538543701171875000000000000000000000000000000000000000000000
}}}
This is because Maxima truncates to float precision:
{{{
(%i20)
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825,fpprec:200;
(%o20) 3.141592653589793
}}}
The only way I've found of avoiding this is converting to an exact
rational and passing it to `bfloat`, which may not be worth the overhead.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9263#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 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-trac.
For more options, visit https://groups.google.com/groups/opt_out.