# Ticket #6024: trac_6024-doctest-fix.patch

File trac_6024-doctest-fix.patch, 4.1 KB (added by mabshoff, 12 years ago)
• ## sage/functions/special.py

```# HG changeset patch
# User mabshoff@sage.math.washington.edu
# Date 1242015087 25200
# Node ID 965f772fa9c05567563bae0042557b461aa81a0a
# Parent  ea030fdff9cfb9621519896d302bf15e53383165
Fix doctest fallout from clisp->ecl switch (#6024)

diff -r ea030fdff9cf -r 965f772fa9c0 sage/functions/special.py```
 a sage: float(jacobi("sn",1/2,1/2)) 0.4707504736556572 sage: float(inverse_jacobi("sn",0.47,1/2)) 0.4990982313222197 0.49909823132221959 sage: float(inverse_jacobi("sn",0.4707504,0.5)) 0.49999991146655459 0.49999991146655481 sage: P = plot(inverse_jacobi('sn', x, 0.5), 0, 1, plot_points=20) Now to view this, just type show(P).
• ## sage/interfaces/expect.py

`diff -r ea030fdff9cf -r 965f772fa9c0 sage/interfaces/expect.py`
 a EXAMPLES:: sage: maxima.quad_qags(x, x, 0, 1, epsrel=1e-4) [0.5,5.5511151231257...E-15,21,0] [0.5,5.5511151231257...e-15,21,0] sage: maxima.function_call('quad_qags', [x, x, 0, 1], {'epsrel':'1e-4'}) [0.5,5.5511151231257...E-15,21,0] [0.5,5.5511151231257...e-15,21,0] """ args, kwds = self._convert_args_kwds(args, kwds) self._check_valid_function_name(function)
• ## sage/interfaces/maxima.py

`diff -r ea030fdff9cf -r 965f772fa9c0 sage/interfaces/maxima.py`
 a EXAMPLES:: sage: maxima.completions('gc', verbose=False) ['gc', 'gcd', 'gcdex', 'gcfactor', 'gcprint', 'gctime'] ['gctime', 'gcdex', 'gcd', 'gc', 'gcprint', 'gcfactor'] """ if verbose: print s, EXAMPLES:: sage: maxima._commands(verbose=False) ['a', 'abconvtest', ['asympt', 'automatic', ... 'Z'] 'zeroequiv'] """ try: return self.__commands EXAMPLES:: sage: maxima('exp(-sqrt(x))').nintegral('x',0,1) (.5284822353142306, 4.163314137883845E-11, 231, 0) (.5284822353142306, 4.163314137883845e-11, 231, 0) Note that GP also does numerical integration, and can do so to very high precision very quickly::
• ## sage/symbolic/expression.pyx

`diff -r ea030fdff9cf -r 965f772fa9c0 sage/symbolic/expression.pyx`
 a sage: float(S(0.7).arctan2(0.6)) 0.8621700546672264 sage: maxima('atan2(0.7,0.6)') .8621700546672261 .8621700546672264 sage: float(S(0.7).arctan2(-0.6)) 2.2794225989225669 sage: maxima('atan2(0.7,-0.6)') sage: float(S(-0.7).arctan2(0.6)) -0.8621700546672264 sage: maxima('atan2(-0.7,0.6)') -.8621700546672261 -.8621700546672264 sage: float(S(-0.7).arctan2(-0.6)) -2.2794225989225669 sage: maxima('atan2(-0.7,-0.6)') sage: S(1.0).arcsinh() 0.881373587019543 sage: maxima('asinh(1.0)') .8813735870195429 0.881373587019543 Sage automatically applies certain identies: sage: S(3/2).arcsinh().cosh() sage: S(0.5).arctanh().tanh() 0.500000000000000 sage: maxima('atanh(0.5)') .5493061443340549 .5493061443340548 """ return new_Expression_from_GEx(g_atanh(self._gobj))