Ticket #12950: trac_12950-numeric_comparison_doctest_fixes-trac.patch

File trac_12950-numeric_comparison_doctest_fixes-trac.patch, 2.4 KB (added by jpflori, 7 years ago)
  • sage/calculus/calculus.py

    # HG changeset patch
    # User Burcin Erocal <burcin@erocal.org>
    # Date 1337093385 -7200
    # Node ID 2a811978cf1d996463b279ff0fc95eccaa9ab53d
    # Parent  329827139f0960a2427141901bd58c3315c95e46
    Trac #12950: Fix doctests after comparison of numeric coefficients in Pynac
                 changed.
    
    diff --git a/sage/calculus/calculus.py b/sage/calculus/calculus.py
    a b  
    353353
    354354    sage: k = var("k")
    355355    sage: sum(1/(1+k^2), k, -oo, oo)
    356     1/2*I*psi(-I) - 1/2*I*psi(I) + 1/2*I*psi(-I + 1) - 1/2*I*psi(I + 1)
     356    -1/2*I*psi(I + 1) - 1/2*I*psi(I) + 1/2*I*psi(-I) + 1/2*I*psi(-I + 1)
    357357
    358358Ensure that ticket #8624 is fixed::
    359359
  • sage/calculus/tests.py

    diff --git a/sage/calculus/tests.py b/sage/calculus/tests.py
    a b  
    109109    sage: integrate(exp(1-x^2),x)
    110110    1/2*sqrt(pi)*e*erf(x)
    111111    sage: integrate(sin(x^2),x)
    112     1/8*((I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) + (I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x))*sqrt(pi)   
     112    1/8*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x))*sqrt(pi)
    113113
    114114    sage: integrate((1-x^2)^n,x)
    115115    integrate((-x^2 + 1)^n, x)
  • sage/symbolic/integration/integral.py

    diff --git a/sage/symbolic/integration/integral.py b/sage/symbolic/integration/integral.py
    a b  
    395395                 x y  + Sqrt[--] FresnelS[Sqrt[--] x]
    396396                             2                 Pi
    397397        sage: print f.integral(x)
    398         y^z*x + 1/8*((I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) + (I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x))*sqrt(pi)
     398        y^z*x + 1/8*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x))*sqrt(pi)
    399399
    400400    Alternatively, just use algorithm='mathematica_free' to integrate via Mathematica
    401401    over the internet (does NOT require a Mathematica license!)::
     
    466466    see #3013::
    467467
    468468        sage: integrate(sin(x)*cos(10*x)*log(x), x)
    469         1/198*(11*cos(9*x) - 9*cos(11*x))*log(x) + 1/44*Ei(-11*I*x) - 1/36*Ei(-9*I*x) - 1/36*Ei(9*I*x) + 1/44*Ei(11*I*x)
     469        1/198*(11*cos(9*x) - 9*cos(11*x))*log(x) + 1/44*Ei(-11*I*x) + 1/44*Ei(11*I*x) - 1/36*Ei(-9*I*x) - 1/36*Ei(9*I*x)
    470470
    471471    It is no longer possible to use certain functions without an
    472472    explicit variable.  Instead, evaluate the function at a variable,