Namespaces
Variants
Views
Actions

catanhf, catanh, catanhl

From cppreference.com
< c‎ | numeric‎ | complex
Revision as of 12:54, 8 May 2014 by Newatthis (Talk | contribs)

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

Parameters

z - complex argument

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.

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

See also

(C99)(C99)(C99)
computes the complex arc hyperbolic sine
(function) [edit]
(C99)(C99)(C99)
computes the complex arc hyperbolic cosine
(function) [edit]