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

lorenzo bolla lbolla at gmail.com
Mon Mar 17 06:02:40 EDT 2008


Matlab is consistent, I'm afraid:

>> acosh(1.5)
ans =
    0.9624
>> acosh(1.5 + 0j)
ans =
    0.9624

L.


On Mon, Mar 17, 2008 at 9:40 AM, Charles R Harris <charlesr.harris at gmail.com>
wrote:

> OK,
>
> Which branch do we want to use. As it currently is in numpy and
> scipy.special
>
> arccosh(1.5) =  0.96242365011920694
> arccosh(1.5+0j) =  -0.96242365011920705 + 0.0j
>
> This is consistent with gsl, but inconsistent with Mathematica, NAG,
> Maple, and probably all sensible implementations which use the generally
> accepted principal value. I've left this inconsistency raising an error in
> the ufunc tests until we make a decision. It might be nice to know what
> FORTRAN and MatLab do with this.
>
> Chuck
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>


-- 
Lorenzo Bolla
lbolla at gmail.com
http://lorenzobolla.emurse.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080317/66c02943/attachment.html>


More information about the NumPy-Discussion mailing list