Ticket #9958: trac_9958-fix-real_mpfr.patch

File trac_9958-fix-real_mpfr.patch, 1.5 KB (added by fbissey, 10 years ago)

all fixes to real_mpfr.pyx split from everything else

  • sage/rings/real_mpfr.pyx

    # HG changeset patch
    # User Francois Bissey <francois.bissey@canterbury.ac.nz>
    # Date 1314658936 -43200
    # Node ID 54244d6ac8f79cabdfd5c6cc73653f49d82d119e
    # Parent  5b9db562d1492bd26215586e88e6bbe24545ba1e
    trac 9958: various fix to sage/rings/real_mpfr.pyx
    
    diff --git a/sage/rings/real_mpfr.pyx b/sage/rings/real_mpfr.pyx
    a b  
    190190        sage: R = RealField(2147483648)
    191191        Traceback (most recent call last):
    192192        ...
    193         OverflowError: ... too large to convert to int
     193        OverflowError: ... too large to convert to C long   # 32-bit
     194        OverflowError: ... too large to convert to int      # 64-bit
    194195    """
    195196    global MY_MPFR_PREC_MAX
    196197    # We use 2^31-1 as the largest precision, since 2^31 is not representable
     
    24492450        EXAMPLES::
    24502451
    24512452            sage: RR(pi).__float__()     
    2452             3.1415926535897931
     2453            3.141592653589793
    24532454            sage: type(RR(pi).__float__())
    24542455            <type 'float'>
    24552456        """
     
    25132514        EXAMPLES::
    25142515
    25152516            sage: RR(pi).__complex__()   
    2516             (3.1415926535897931+0j)
     2517            (3.141592653589793+0j)
    25172518            sage: type(RR(pi).__complex__())
    25182519            <type 'complex'>
    25192520        """
     
    51965197            sage: f(2^75)
    51975198            Traceback (most recent call last):
    51985199            ...
    5199             OverflowError: long int too large to convert to int
     5200            OverflowError: Python int too large to convert to C long
    52005201       
    52015202        ::
    52025203