2
* This file has no copyright assigned and is placed in the Public Domain.
3
* This file is part of the w64 mingw-runtime package.
4
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
7
Contributed by Danny Smith
17
ctanh (x + I * y) = (sinh (2 * x) + sin (2 * y) * I )
18
/ (cosh (2 * x) + cos (2 * y)) .
22
ctanhl (long double complex Z)
24
long double complex Res;
25
long double two_R = 2.0L * __real__ Z;
26
long double two_I = 2.0L * __imag__ Z;
27
long double denom = coshl (two_R) + cosl (two_I);
32
__real__ Res = HUGE_VALL;
33
__imag__ Res = HUGE_VALL;
35
else if (isinf (denom))
38
__real__ Res = two_R > 0 ? 1.0L : -1.0L;
43
__real__ Res = sinhl (two_R) / denom;
44
__imag__ Res = sinl (two_I) / denom;
2
* This file has no copyright assigned and is placed in the Public Domain.
3
* This file is part of the w64 mingw-runtime package.
4
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
7
Contributed by Danny Smith
17
ctanh (x + I * y) = (sinh (2 * x) + sin (2 * y) * I )
18
/ (cosh (2 * x) + cos (2 * y)) .
22
ctanhl (long double complex Z)
24
long double complex Res;
25
long double two_R = 2.0L * __real__ Z;
26
long double two_I = 2.0L * __imag__ Z;
27
long double denom = coshl (two_R) + cosl (two_I);
32
__real__ Res = HUGE_VALL;
33
__imag__ Res = HUGE_VALL;
35
else if (isinf (denom))
38
__real__ Res = two_R > 0 ? 1.0L : -1.0L;
43
__real__ Res = sinhl (two_R) / denom;
44
__imag__ Res = sinl (two_I) / denom;