catanhf, catanh, catanhl

From cppreference.com
< c‎ | numeric‎ | complex
Defined in header <complex.h>
float complex       catanhf( float complex z );
(since C99)
double complex      catanh( double complex z );
(since C99)
long double complex catanhl( long double complex z );
(since C99)

Computes the complex arc hyperbolic tangent of z with branch cuts outside the interval [−1; +1] along the real axis.

Contents

[edit] Parameters

z - complex argument

[edit] Return value

The complex arc hyperbolic tangent of z in the interval (−∞; +∞) along the real axis and in the interval [−iπ/2; +iπ/2] along the imaginary axis.

[edit] Example

#include <stdio.h>
#include <complex.h>
 
int main(void)
{
    double complex z;
 
    z = ctanh(1.0+2.0*I);
    printf("ctanh(1.0+2.0*I)            ==> %f%+fi\n", creal(z),cimag(z));
 
    z = catanh(1.166736-0.243458*I);
    printf("catanh(1.166736-0.243458*I) ==> %f%+fi\n", creal(z),cimag(z));
 
    return 0;
}

Output:

ctanh(1.0+2.0*I)            ==> 1.166736-0.243458i
catanh(1.166736-0.243458*I) ==> 1.000000-1.141592i

[edit] See also

(C99)(C99)(C99)
computes the complex arc hyperbolic sine
(function)
(C99)(C99)(C99)
computes the complex arc hyperbolic cosine
(function)
(C99)(C99)(C99)
computes the complex hyperbolic tangent
(function)
(C99)(C99)(C99)
computes inverse hyperbolic tangent (artanh(x))
(function)
C++ documentation for atanh