ccosh


ccosh

Calculates the hyperbolic cosine of a complex number

 #include <complex.h> double complex ccosh ( double complex z  ); float complex ccoshf ( float complex z  ); long double complex ccoshl ( long double complex z  ); 

The hyperbolic cosine of a complex number z is equal to (exp(z) + exp(-z)) / 2. The ccosh functions return the hyperbolic cosine of their complex argument.

Example

 double complex v, w, z = 1.2 - 3.4 * I; v = ccosh( z ); w = 0.5 * ( cexp(z) + cexp(-z) ); printf( "The ccosh( ) function returns %.2f %+.2f*I.\n",         creal(v), cimag(v) ); printf( "Using the cexp( ) function, the result is %.2f %+.2f*I.\n",         creal(w), cimag(w) ); 

This code produces the following output:

 The ccosh( ) function returns -1.75 +0.39*I. Using the cexp( ) function, the result is -1.75 +0.39*I. 

See Also

csinh( ), ctanh( ), cacosh( ), casinh( ), catanh( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net