Ticket #13364: doctests.2.patch

File doctests.2.patch, 3.7 KB (added by kcrisman, 7 years ago)

Use this patch

  • sage/functions/exp_integral.py

    # HG changeset patch
    # User Dmitrii Pasechnik <dimpase@gmail.com>
    # Date 1356952203 -28800
    # Node ID da5a3e148c2eaa262b6ad8dfb0f54dab18949425
    # Parent  d0c0692ebfc09c88785ce82c3ef2f147e448fb18
    doctests for maxima update to version 5.29.1; renaming to_poly_solver (obsolete) to to_poly_solve in maxima_lib.py
    
    diff --git a/sage/functions/exp_integral.py b/sage/functions/exp_integral.py
    a b  
    10711071        -cosh(1/2) + 1/2*sinh_integral(1/2) + 1
    10721072        sage: integrate(sinh_integral(x), x, 0, 1/2).n() # correct
    10731073        0.125872409703453
    1074         sage: integrate(sinh_integral(x), x, 0, 0.5).n() # incorrect!
    1075         0.125872409703453 + 1.57079632679490*I
     1074        sage: integrate(sinh_integral(x), x, 0, 0.5).n() # fixed in maxima 5.29.1
     1075        0.125872409703453
    10761076
    10771077    ALGORITHM:
    10781078
  • sage/interfaces/maxima_abstract.py

    diff --git a/sage/interfaces/maxima_abstract.py b/sage/interfaces/maxima_abstract.py
    a b  
    420420        EXAMPLES::
    421421       
    422422            sage: maxima.version()
    423             '5.26.0'
     423            '5.29.1'
    424424        """
    425425        return maxima_version()
    426426
     
    23522352   
    23532353        sage: from sage.interfaces.maxima_abstract import maxima_version
    23542354        sage: maxima_version()
    2355         '5.26.0'
     2355        '5.29.1'
    23562356    """
    23572357    return os.popen('maxima --version').read().split()[-1]
    23582358
     
    23642364   
    23652365        sage: from sage.interfaces.maxima_abstract import maxima_console
    23662366        sage: maxima_console()                    # not tested
    2367         Maxima 5.26.0 http://maxima.sourceforge.net
     2367        Maxima 5.29.1 http://maxima.sourceforge.net
    23682368        ...
    23692369    """
    23702370    os.system('maxima')
  • sage/interfaces/maxima_lib.py

    diff --git a/sage/interfaces/maxima_lib.py b/sage/interfaces/maxima_lib.py
    a b  
    139139# display2d -- no ascii art output
    140140# keepfloat -- don't automatically convert floats to rationals
    141141init_code = ['display2d : false', 'domain : complex', 'keepfloat : true',
    142             'load(to_poly_solver)', 'load(simplify_sum)',
     142            'load(to_poly_solve)', 'load(simplify_sum)',
    143143            'load(abs_integrate)']
    144144
    145145# Turn off the prompt labels, since computing them *very
  • sage/misc/functional.py

    diff --git a/sage/misc/functional.py b/sage/misc/functional.py
    a b  
    719719        2
    720720
    721721    Another symbolic integral, from :trac:`11238`, that used to return
    722     zero incorrectly::
     722    zero incorrectly; with maxima 5.26.0 one gets 1/2*sqrt(pi)*e^(1/4),
     723    whereas with 5.29.1 the expression is less pleasant, but still
     724    has the same value::
    723725
    724726        sage: f = exp(-x) * sinh(sqrt(x))
    725         sage: integrate(f, x, 0, Infinity)
     727        sage: t = integrate(f, x, 0, Infinity); t            # long time
     728        -1/4*((erf(1) - 1)*sqrt(pi) - sqrt(pi) + 2*e^(-1) - 2)*e^(1/4) + 1/4*((erf(1) - 1)*sqrt(pi) + sqrt(pi) + 2*e^(-1) - 2)*e^(1/4)
     729        sage: t.simplify_exp()  # long time
    726730        1/2*sqrt(pi)*e^(1/4)
    727731
     732
    728733    """
    729734    if hasattr(x, 'integral'):
    730735        return x.integral(*args, **kwds)
  • sage/symbolic/integration/integral.py

    diff --git a/sage/symbolic/integration/integral.py b/sage/symbolic/integration/integral.py
    a b  
    670670        sage: integral(1/x^2, x, -infinity, -1, algorithm='sympy')
    671671        1
    672672
     673    Check that :trac:`11737` is fixed::
     674
     675        sage: N(integrate(sin(x^2)/(x^2), x, 1, infinity))
     676        0.285736646322858
     677
    673678    """
    674679    expression, v, a, b = _normalize_integral_input(expression, v, a, b)
    675680    if algorithm is not None: