------- Comment #23 from burnus at gcc dot gnu dot org 2009-07-10 15:45 ------- Created an attachment (id=18173) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18173&action=view) Test implementation in C for complex arc{tan,sin,cos}{,h}
> Fallback implementations via complex logarithm Attached is an implementation of the complex arc{tan,sin,cos}{,h} using complex log and complex sqrt; plus test cases comparing to libc version; plus result on my system with Mathematica comparison). The test show that the result is good unless either value is Inf. In that case, NaN is returned instead of the proper result. The GLIBC also has problems, often it returns "(something,Inf)" instead of "(0, Inf)". The question is whether this is good enough for whether one needs a special case for +/-Inf at the real/imaginary part. (Note: I only looked at (0,Inf), (Inf,0), (Inf,Inf) and not at (Inf,finite) etc.) FX: If you are interested in creating a fall-back version for libgfortran ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197