# ccoshf, ccosh, ccoshl

< c‎ | numeric‎ | complex

C
 Language headers Type support Dynamic memory management Error handling Program utilities Variadic function support Date and time utilities Strings library Algorithms Numerics Input/output support Localization support Thread support (C11) Atomic operations (C11) Technical Specifications

Complex number arithmetic
Types and the imaginary constant
Manipulation
Power and exponential functions
Trigonometric functions
Hyperbolic functions
 ccosh csinh ctanh

 Defined in header `` float complex       ccoshf( float complex z ); (since C99) double complex      ccosh( double complex z ); (since C99) long double complex ccoshl( long double complex z ); (since C99)

Computes the complex hyperbolic cosine of `z`.

## Contents

### Parameters

 z - complex argument

### Return value

The complex hyperbolic cosine of `z`.

### Example

```#include <stdio.h>
#include <complex.h>
#include <math.h>

#define PI acos(-1)

int main()
{
double complex z;

/* Hyperbolic functions are periodic with respect to the imaginary component. */
/* The period of cosh is 2*pi*i.                                              */
z = ccosh(0.0+0.0*PI*I);
printf("ccosh(0.0+0*PI*I) ==> %f%+fi\n", creal(z),cimag(z));

z = ccosh(0.0 + 2*PI*I);
printf("ccosh(0.0+2*PI*I) ==> %f%+fi\n", creal(z),cimag(z));

z = ccosh(0.0 + 4*PI*I);
printf("ccosh(0.0+4*PI*I) ==> %f%+fi\n", creal(z),cimag(z));

return 0;
}```

Output:

```ccosh(0.0+0*PI*I) ==> 1.000000+0.000000i
ccosh(0.0+2*PI*I) ==> 1.000000-0.000000i
ccosh(0.0+4*PI*I) ==> 1.000000-0.000000i```