Ticket #8157: trac_8157.patch

File trac_8157.patch, 1.0 KB (added by zimmerma, 12 years ago)
  • sage/rings/real_mpfr.pyx

    # HG changeset patch
    # User Paul Zimmermann <zimmerma@loria.fr>
    # Date 1266961804 -3600
    # Node ID 1bc5cd577f888df838d501d693afb51737aebaf5
    # Parent  5b7040fd9e7dc9192ee2b0ce7f699d9120d78358
    increased precision limit for RealField from 2^24 to 2^31-1, which is the
    maximum possible (within Sage) [together with Francois Maltey]
    
    diff -r 5b7040fd9e7d -r 1bc5cd577f88 sage/rings/real_mpfr.pyx
    a b  
    177177    """
    178178    return MPFR_PREC_MIN
    179179
    180 cdef int MY_MPFR_PREC_MAX = 16777216
     180cdef int MY_MPFR_PREC_MAX = 2147483647
    181181def mpfr_prec_max():
    182182    global MY_MPFR_PREC_MAX
    183     # lots of things in mpfr *crash* if we use MPFR_PREC_MAX!
    184     # So don't.   Using 2**24 seems to work well. (see above)
     183    # We use 2^31-1 as the largest precision, since 2^31 is not representable
     184    # as a 32-bit int
    185185    return MY_MPFR_PREC_MAX
    186186
    187187#*****************************************************************************