#11666: Upgrade MPFR to 3.1.0
--------------------------------+-------------------------------------------
Reporter: leif | Owner: leif
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-5.0
Component: packages | Keywords: sd32 MPFR spkg wishlist
sd35.5
Work_issues: correct doctests | Upstream: N/A
Reviewer: Paul Zimmermann | Author: Mike Hansen, Jean-Pierre
Flori
Merged: | Dependencies: #12171
--------------------------------+-------------------------------------------
Comment(by zimmerma):
Jean-Pierre,
> I've had a look at the random MPFR real number generation code and there
was indeed a "hack" for 32 bits systems before which requested more bits
(31 from randstate doc, although real_mpfr says 32) from MPIR to get an
equivalent MPFR behavior. Although, if I force sage to do the same on my
64 bits system (just adding a call to rstate.c_random() unconditionally in
real_mpfr), I do not get what 32 bits (and 64 bits) systems used to return
(nor what my 64 bits system now return which was to expect).
this is expected. If you add the call to {{{rstate.c_random()}}}
unconditionally,
then on 64-bit systems you will draw 64 extra random bits when the
precision mod 64 is between 1 and 32, whereas on 32-bit systems you will
draw only 32 extra random bits.
In fact, since version 3.1.0, MPFR leaves the GMP random generator in the
same state,
whatever the number of bits per limb. See changeset 7133 from MPFR, and
http://gmplib.org/list-archives/gmp-devel/2010-September/001642.html. Thus
the fix is
simply to remove the "gross hack" at lines 930-942 in real_mpfr.pyx.
Paul
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11666#comment:49>
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.