ccoshf, ccosh, ccoshl - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# ccoshf, ccosh, ccoshl

From cppreference.com
< c‎ | numeric‎ | complex

Defined in header `<complex.h>` |  |
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`.

### [edit] Parameters

z | - | complex argument

### [edit] Return value

The complex hyperbolic cosine of `z`.

### [edit] Example

Run this code

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

    #define PI acos(-1)

    int main(void)
    {
        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

### [edit] See also

csinhcsinhfcsinhl (C99)(C99)(C99) | computes the complex hyperbolic sine (function) [edit]
ctanhctanhfctanhl (C99)(C99)(C99) | computes the complex hyperbolic tangent (function) [edit]
cacoshcacoshfcacoshl (C99)(C99)(C99) | computes the complex arc hyperbolic cosine (function) [edit]
coshcoshfcoshl (C99)(C99) | computes hyperbolic cosine (ch(x)) (function) [edit]
C++ documentation for cosh

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