Ticket #9958: trac_9958-fixing_numericalnoise-part4.patch

File trac_9958-fixing_numericalnoise-part4.patch, 3.5 KB (added by fbissey, 10 years ago)

fix numerical noise part 4: the forgotten bits

  • sage/categories/examples/semigroups.py

    # HG changeset patch
    # User Francois Bissey <francois.bissey@canterbury.ac.nz>
    # Date 1303947692 -43200
    # Node ID 12bee39094fcfcd2816f72ab80640fd03b674136
    # Parent  3b92588cf32615f3a1627fa5fd237699d526ead2
    #9958 fixing numerical noise part 4 - the forgotten one
    
    diff --git a/sage/categories/examples/semigroups.py b/sage/categories/examples/semigroups.py
    a b  
    3030    This is the semigroup that contains all sorts of objects::
    3131
    3232        sage: S.some_elements()
    33         [3, 42, 'a', 3.3999999999999999, 'raton laveur']
     33        [3, 42, 'a', 3.4, 'raton laveur']
    3434
    3535    with product rule given by $a \times b = a$ for all $a, b$::
    3636
     
    124124        EXAMPLES::
    125125
    126126            sage: Semigroups().example().some_elements()
    127             [3, 42, 'a', 3.3999999999999999, 'raton laveur']
     127            [3, 42, 'a', 3.4, 'raton laveur']
    128128
    129129        """
    130130        return [self(i) for i in [3, 42, "a", 3.4, "raton laveur"]]
  • sage/categories/examples/semigroups_cython.pyx

    diff --git a/sage/categories/examples/semigroups_cython.pyx b/sage/categories/examples/semigroups_cython.pyx
    a b  
    193193    This is the semigroup which contains all sort of objects::
    194194
    195195        sage: S.some_elements()
    196         [3, 42, 'a', 3.3999999999999999, 'raton laveur']
     196        [3, 42, 'a', 3.4, 'raton laveur']
    197197
    198198    with product rule is given by $a \times b = a$ for all $a,b$. ::
    199199
  • sage/misc/randstate.pyx

    diff --git a/sage/misc/randstate.pyx b/sage/misc/randstate.pyx
    a b  
    255255    sage: with seed(1):
    256256    ...       rtest();
    257257    ...       rtest();
    258     (978, 0.184109262667515, -3*x^2 - 1/12, (4,5), [ 0, 1, 1, 0, 0 ], 1161603091, 60359, 0.83350776541997362)  # 32-bit
    259     (138, -0.247578366457583, 2*x - 24, (), [ 1, 1, 1, 0, 1 ], 1966097838, 10234, 0.0033332230808060803)       # 32-bit
    260     (978, 0.184109262667515, -3*x^2 - 1/12, (4,5), [ 0, 1, 1, 0, 0 ], 807447831, 60359, 0.83350776541997362)   # 64-bit
    261     (138, -0.247578366457583, 2*x - 24, (), [ 1, 1, 1, 0, 1 ], 1010791326, 10234, 0.0033332230808060803)       # 64-bit
     258    (978, 0.184109262667515, -3*x^2 - 1/12, (4,5), [ 0, 1, 1, 0, 0 ], 1161603091, 60359, 0.8335077654199736)  # 32-bit
     259    (138, -0.247578366457583, 2*x - 24, (), [ 1, 1, 1, 0, 1 ], 1966097838, 10234, 0.0033332230808060803)      # 32-bit
     260    (978, 0.184109262667515, -3*x^2 - 1/12, (4,5), [ 0, 1, 1, 0, 0 ], 807447831, 60359, 0.8335077654199736)   # 64-bit
     261    (138, -0.247578366457583, 2*x - 24, (), [ 1, 1, 1, 0, 1 ], 1010791326, 10234, 0.0033332230808060803)      # 64-bit
    262262    sage: r2m == rtest()
    263263    True
    264264
  • sage/symbolic/constants.py

    diff --git a/sage/symbolic/constants.py b/sage/symbolic/constants.py
    a b  
    11071107    EXAMPLES::
    11081108   
    11091109        sage: float(twinprime)
    1110         0.66016181584686962
     1110        0.6601618158468696
    11111111        sage: twinprime.n(digits=60)
    11121112        0.660161815846869573927812110014555778432623360284733413319448
    11131113
  • sage/symbolic/expression.pyx

    diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
    a b  
    54345434            sage: maxima('atan2(-0.7,-0.6)')
    54355435            -2.279422598922567
    54365436            sage: float(SR(0).arctan2(-0.6))
    5437             3.1415926535897931
     5437            3.141592653589793
    54385438            sage: maxima('atan2(0,-0.6)')
    54395439            3.141592653589793
    54405440            sage: float(SR(0).arctan2(0.6))