cmath module errata

Nadav Horesh nadavh at
Thu Sep 7 18:18:47 CEST 2000

The functions cmath.asinh and cmath.acosh behavior is erratic (at least
at Python versions <= 1.6)

For correct results use the following definitions:

def asinh(x):
    return 2*cmath.log(sq05*(cmath.sqrt(x+1j)+cmath.sqrt(x-1j)))

def acosh(x):
   return 2*cmath.log(sq05*(cmath.sqrt(x+1.0)+cmath.sqrt(x-1.0)))

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nadavh.vcf
Type: text/x-vcard
Size: 360 bytes
Desc: Card for Nadav Horesh
URL: <>

More information about the Python-list mailing list