Ticket #10430: 10430_branch_cut.patch

File 10430_branch_cut.patch, 3.1 KB (added by jdemeyer, 11 years ago)

Doctest fixes

  • sage/functions/hyperbolic.py

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1291972113 -3600
    # Node ID 7cfa02aae78d6c65e6c5d479f6132f1fe3197cbd
    # Parent  1cb202e8a606dc2ab85489ff9df9cb4ea78c1aa1
    #10430: Fix doctests for changed branch cut convention due to PARI upgrade
    
    diff -r 1cb202e8a606 -r 7cfa02aae78d sage/functions/hyperbolic.py
    a b  
    586586            sage: arcsech(1/2)
    587587            arcsech(1/2)
    588588            sage: arcsech(1 + I*1.0)
    589             -0.530637530952518 + 1.11851787964371*I
     589            0.530637530952518 - 1.11851787964371*I
    590590            sage: arcsech(1/2).n(200)
    591591            1.3169578969248167086250463473079684440269819714675164797685
    592592            sage: float(arcsech(1/2))
  • sage/libs/pari/gen.pyx

    diff -r 1cb202e8a606 -r 7cfa02aae78d sage/libs/pari/gen.pyx
    a b  
    39493949            sage: pari(1/2).acos()
    39503950            1.04719755119660
    39513951            sage: pari(1.1).acos()
    3952             -0.443568254385115*I
     3952            0.443568254385115*I
    39533953            sage: C.<i> = ComplexField()
    39543954            sage: pari(1.1+i).acos()
    39553955            0.849343054245252 - 1.09770986682533*I
     
    40474047            sage: pari(pari(0.5).sin()).asin()
    40484048            0.500000000000000
    40494049            sage: pari(2).asin()
    4050             1.57079632679490 + 1.31695789692482*I
     4050            1.57079632679490 - 1.31695789692482*I
    40514051        """
    40524052        sig_on()
    40534053        return P.new_gen(gasin(x.g, pbw(precision)))
     
    41114111            sage: pari(0).atanh()
    41124112            0.E-19
    41134113            sage: pari(2).atanh()
    4114             0.549306144334055 + 1.57079632679490*I
     4114            0.549306144334055 - 1.57079632679490*I
    41154115        """
    41164116        sig_on()
    41174117        return P.new_gen(gath(x.g, pbw(precision)))
  • sage/rings/complex_number.pyx

    diff -r 1cb202e8a606 -r 7cfa02aae78d sage/rings/complex_number.pyx
    a b  
    1212- Vincent Delecroix (2010-01): plot function
    1313"""
    1414
    15 #################################################################################
     15#*****************************************************************************
    1616#       Copyright (C) 2006 William Stein <wstein@gmail.com>
    1717#
    1818#  Distributed under the terms of the GNU General Public License (GPL)
    19 #
     19#  as published by the Free Software Foundation; either version 2 of
     20#  the License, or (at your option) any later version.
    2021#                  http://www.gnu.org/licenses/
    2122#*****************************************************************************
    2223
     24
    2325import math
    2426import operator
    2527
     
    12121214        EXAMPLES::
    12131215
    12141216            sage: ComplexField(100)(1,1).arcsech()
    1215             -0.53063753095251782601650945811 + 1.1185178796437059371676632938*I
     1217            0.53063753095251782601650945811 - 1.1185178796437059371676632938*I
    12161218        """
    12171219        return (~self).arccosh()
    12181220