#19256: inconsistent numerics with RR/CC/CDF(pi,sqrt(2))
-------------------------+----------------------------
Reporter: rws | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.9
Component: symbolics | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
-------------------------+----------------------------
{{{
sage: (CC(pi)-pi).n()
-3.10862446895044e-15
sage: (RR(pi)-pi).n()
0.000000000000000
sage: (CC(1/7)-1/7).n()
0.000000000000000
sage: (RR(1/7)-1/7).n()
0.000000000000000
sage: (CC(sqrt(2))-sqrt(2)).n()
-5.10702591327572e-15
sage: (RR(sqrt(2))-sqrt(2)).n()
0.000000000000000
}}}
Changing the precision of the expression makes a difference:
{{{
sage: (RR(pi.n(200))-pi.n(200)).n()
0.000000000000000
sage: (CC(pi.n(200))-pi.n(200)).n()
0.000000000000000
sage: (RR((sqrt(2)).n(200))-(sqrt(2)).n(200)).n()
0.000000000000000
sage: (CC((sqrt(2)).n(200))-(sqrt(2)).n(200)).n()
0.000000000000000
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/19256>
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/d/optout.