# Ticket #5777: trac_5777-01-pi_print.patch

File trac_5777-01-pi_print.patch, 2.2 KB (added by burcin, 11 years ago)

fix doctests for printing changes

• ## sage/symbolic/expression.pyx

```# HG changeset patch
# User Burcin Erocal <burcin@erocal.org>
# Date 1239558369 -7200
# Node ID c5c2d8968912a885bfbb5eba54816098c167924c
# Parent  cd16ae6f91f570cc24274e5c192b06488c30f4d6
Fix doctests to reflect how pi is printed in pynac.

diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx```
 a sage: tan(sage.symbolic.constants.pi/2) Traceback (most recent call last): ... ValueError: simple pole at 1/2*Pi ValueError: simple pole at 1/2*pi sage: tan(S(1)) tan(1) sage: tan(S(RealField(150)(1))) sage: S(1).arccos() 0 sage: S(1/2).arccos() 1/3*Pi 1/3*pi sage: S(0.4).arccos() 1.15927948072741 sage: plot(lambda x: S(x).arccos(), -1,1) sage: x.arctan() arctan(x) sage: S(1).arctan() 1/4*Pi 1/4*pi sage: S(1/2).arctan() arctan(1/2) sage: S(0.5).arctan() sage: x.arctan2(y) arctan2(x, y) sage: S(1/2).arctan2(1/2) 1/4*Pi 1/4*pi sage: maxima.eval('atan2(1/2,1/2)') '%pi/4' We compare a bunch of different evaluation points between Sage and Maxima: sage: S(-0.7).arctan2(S(-0.6)) -Pi + 0.862170054667226 -pi + 0.862170054667226 sage: float(S(0.7).arctan2(0.6)) 0.8621700546672264 sage: x.arccosh() arccosh(x) sage: S(0).arccosh() 1/2*I*Pi 1/2*I*pi sage: S(1/2).arccosh() arccosh(1/2) sage: S(CDF(1/2)).arccosh() sage: (x/y).zeta() zeta(x/y) sage: S(2).zeta() 1/6*Pi^2 1/6*pi^2 sage: S(3).zeta() zeta(3) sage: S(CDF(0,1)).zeta()