ccoshf, ccosh, ccoshl
Header: <complex.h>
1-3) Computes the complex hyperbolic cosine of z.
# Declarations
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)
#define cosh( z )
(since C99)
# Parameters
z: complex argument
# Return value
If no errors occur, complex hyperbolic cosine of z is returned
# Notes
Hyperbolic cosine is an entire function in the complex plane and has no branch cuts. It is periodic with respect to the imaginary component, with period 2πi
# Example
#include <stdio.h>
#include <math.h>
#include <complex.h>
int main(void)
{
double complex z = ccosh(1); // behaves like real cosh along the real line
printf("cosh(1+0i) = %f%+fi (cosh(1)=%f)\n", creal(z), cimag(z), cosh(1));
double complex z2 = ccosh(I); // behaves like real cosine along the imaginary line
printf("cosh(0+1i) = %f%+fi ( cos(1)=%f)\n", creal(z2), cimag(z2), cos(1));
}