[Numpy-discussion] arccosh for complex numbers, goofy choice of branch

Pauli Virtanen pav@iki...
Thu Jul 17 16:56:12 CDT 2008


Mon, 17 Mar 2008 08:07:38 -0600, Charles R Harris wrote:
[clip]
> OK, that does it. I'm going to change it's behavior.

The problem with bad arccosh branch cuts is still present:

>>> import numpy as np
>>> numpy.__version__
'1.2.0.dev5436.e45a7627a39d'
>>> np.arccosh(-1e-9 + 0.1j)
(-0.099834078899207618-1.5707963277899337j)
>>> np.arccosh(1e-9 + 0.1j)
(0.099834078899207576+1.5707963257998594j)
>>> np.arccosh(-1e-9 - 0.1j)
(-0.099834078899207618+1.5707963277899337j)
>>> np.arccosh(1e-9 - 0.1j)
(0.099834078899207576-1.5707963257998594j)

Ticket #854. http://scipy.org/scipy/numpy/ticket/854

I'll write up some tests for all the functions with branch cuts to verify 
that the cuts and their continuity are correct. (Where "correct" bears 
some resemblance to "ISO C standard", I think...)

-- 
Pauli Virtanen



More information about the Numpy-discussion mailing list