#15337: Speed up ulp() method of real_mpfr.pyx
------------------------------------+----------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-5.13
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------------+----------------------------
Comment (by zimmerma):
> So what do you prefer: never returning self? returning self for NaN and
+Inf but not for -Inf?
I would prefer consistency: either always returning self, or never
returning self (unless there is a good reason for not being coherent).
While playing with ulp I noticed something strange:
{{{
sage: a=RDF(0)
sage: a, a.ulp()
(0.0, 4.94065645841e-324)
sage: b, b.ulp()
(4.94065645841e-324, 0.0)
}}}
The same holds with RR:
{{{
sage: a=RR(0)
sage: a, a.ulp()
(0.000000000000000, 8.50969131174084e-1388255822130839284)
sage: b=a.ulp()
sage: b, b.ulp()
(8.50969131174084e-1388255822130839284, 0.000000000000000)
}}}
Finally:
> In MPFR, this isn't true since MPFR doesn't have denormal numbers.
agreed.
Paul
--
Ticket URL: <http://trac.sagemath.org/ticket/15337#comment:17>
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.