Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
asinh(%i*2b0) causes the error
`pquotient' by zero
But asinh(%i*2) and asinh(%i*2d0) work fine.
Add a tiny real part, and it's OK
(%i193) asinh(1.0b-1000+%i*2.0b0) ;
The division by zero comes from complex-asin. A patch is attached.
fpatan -> fpatan2
Thanks for the patch. I'm not 100% sure it's quite right since atan(y/x) is not the same as atan2(y,x).
If I look at the original source (from CMUCL, based on Kahan's paper), I see that divide-by-zero traps are disabled. To be equivalent, I think we only need to check for division by zero and instead of calling atan, just return pi/2 or -pi/2, as appropriate.
Fixed in CVS by checking for division by zero and returning pi/2 or -pi/2 as appropriate.