inverse hyperbolic cotangent
I think the inverse hyperbolic cotangent is the same as 1/(atanh) however math.h doesnt have acoth however my problem is this:
c code produces #QNAN0 from this:
Code:
xx = (exp(a_global*2*pi) - cosh(a_global*b_global*rev_t))/(sinh(a_global*b_global*rev_t));
c0 = -1/atanh(xx);
however xx produces the value 4.31.
-acoth(4.31) in matlab produces -0.2363
-1/atanh(4.31) in matlab produces -0.0937 + 0.6225i
so i know its imaginary and therefore c cannot calculate it. However how else can I calculate acoth() in c, because this obviously doesnt work?