##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# 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.

### [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

Run this code

    #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

casinh casinhf casinhl (C99)(C99)(C99) | computes the complex arc hyperbolic sine (function) [edit]
cacosh cacoshf cacoshl (C99)(C99)(C99) | computes the complex arc hyperbolic cosine (function) [edit]
ctanh ctanhf ctanhl (C99)(C99)(C99) | computes the complex hyperbolic tangent (function) [edit]
atanh atanhf atanhl (C99)(C99)(C99) | computes inverse hyperbolic tangent (artanh(x)) (function) [edit]
C++ documentation for atanh

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/numeric/complex/catanh&oldid=70588"