Ticket #10792: trac_10792-fix_riemann_doctest.patch

File trac_10792-fix_riemann_doctest.patch, 2.0 KB (added by fbissey, 9 years ago)

fix the doctests in calculus/riemann.pyx

  • sage/calculus/riemann.pyx

    # HG changeset patch
    # User Francois Bissey <francois.bissey@canterbury.ac.nz>
    # Date 1300314020 -46800
    # Node ID c0f9c790b93136cf7e940c2dcddaf4ff47e35c67
    # Parent  0af12745b0716698f9ebcd085305751dab2edf64
    trac #10792 fix calculus/riemann.pyx doctests. Some of these tests are very sensitive so I reduced the number of
    significative figures of most of them. I also kept e-xx in the results to keep track of the order of magnitude. Some of
    these results should be close to zero and if the values move again in the future it will be easy to see if it is from a
    small value to another small value.
    
    diff -r 0af12745b071 -r c0f9c790b931 sage/calculus/riemann.pyx
    a b  
    121121
    122122        sage: x = 0.75  # long time
    123123        sage: print "error =", m.inverse_riemann_map(m.riemann_map(x)) - x  # long time
    124         error = (-0.0001211863...+0.001606139...j)
     124        error = (-0.000...+0.0016...j)
    125125
    126126    ALGORITHM:
    127127
     
    486486
    487487            sage: m = Riemann_Map([lambda t: e^(I*t) - 0.5*e^(-I*t)], [lambda t: I*e^(I*t) + 0.5*I*e^(-I*t)], 0)  # long time (4 sec)
    488488            sage: m.riemann_map(0.25 + sqrt(-0.5))  # long time
    489             (0.137514137885...+0.876696023004...j)
     489            (0.137514...+0.87669602...j)
    490490            sage: m.riemann_map(1.3*I)  # long time
    491             (-1.561029396...+0.989694535737...j)
     491            (-1.56...e-05+0.989694...j)
    492492            sage: I = CDF.gen()  # long time
    493493            sage: m.riemann_map(0.4)  # long time
    494             (0.733242677182...+3.50767714...j)
     494            (0.733242677...+3.2...e-06j)
    495495            sage: import numpy as np  # long time
    496496            sage: m.riemann_map(np.complex(-3, 0.0001))  # long time
    497             (1.405757135...+1.05106...j)
     497            (1.405757...e-05+8.06...e-10j)
    498498        """
    499499        pt1 = np.complex(pt)
    500500        cdef np.ndarray[double complex, ndim=1] q_vector = 1 / (