#14416: weird conversion from QQ to RDF
---------------------------------------------------+------------------------
Reporter: zimmerma | Owner: AlexGhitza
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.10
Component: basic arithmetic | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Paul
Zimmermann
Authors: Paul Zimmermann, Jeroen Demeyer | Merged in:
Dependencies: #14335, #14336 | Stopgaps:
---------------------------------------------------+------------------------
Changes (by zimmerma):
* status: needs_review => needs_work
* reviewer: => Paul Zimmermann
Comment:
Jeroen, a few tiny comments:
* in the following test, you can replace 20 by 13. Also, you could add
{{{all([RDF(q) == RR(q) for q in Q])}}} which would exercise the code for
large numerators and denominators.
{{{
sage: Q = continued_fraction(pi, bits=3000).convergents()[20:]
sage: RDFpi = RDF(pi)
sage: all([RDF(q) == RDFpi for q in Q])
}}}
* is the {{{except?}}} value really needed in {{{mpq_get_d_nearest}}}?
* please replace {{{round-to-even}}} with {{{round-to-nearest-even}}}.
Round to even and round to odd also exist.
* please replace {{{occured}}} by {{{occurred}}} (several places, already
mentioned)
Apart from that (and if tests still pass) I'm fine with the patch.
Paul
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14416#comment:52>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.