- NAME
-
cacosh - complex arc hyperbolic cosine
- SYNOPSIS
#include <complex.h>
double complex cacosh (double complex z);
float complex cacoshf (float complex z);
long double complex cacoshl (long double complex z);
- CONFORMING TO
-
C99
- DESCRIPTION
-
The cacosh() function calculates the complex arc hyperbolic cosine of
z
. Ify = cacosh(z)
, thenz = ccosh(y)
. The imaginary part ofy
is chosen in the interval[-pi,pi]
. The real part ofy
is chosen non-negative.
One has: cacosh(z) = 2 * clog(csqrtz + 1) / 2) + csqrt((z - 1) / 2
link:src/cacosh.c[role=include]
- OUTPUT
$ gcc -Wall -lm cacosh.c $ ./a.out 1 2 cacosh() = 1.529 1.144*i formula = 1.529 1.144*i