ctanh


ctanh

Calculates the hyperbolic tangent of a complex number

 #include <complex.h> double complex ctanh ( double complex z  ); float complex ctanhf ( float complex z  ); long double complex ctanhl ( long double complex z  ); 

The hyperbolic tangent of a complex number z is equal to sinh(z) / cosh(z). The ctanh functions return the hyperbolic tangent of their complex argument.

Example

 double complex v, w, z =  -0.5 + 1.23 * I; v = ctanh( z ); w = csinh( z ) / ccosh( z ); printf("The ctanh( ) function returns %.2f %+.2f*I.\n", creal(v), cimag(v) ); printf("Using the csinh( ) and ccosh( ) functions yields %.2f %+.2f*I.\n",         creal(w), cimag(w) ); 

This code produces the following output:

 The ctanh( ) function returns -1.53 +0.82*I. Using the csinh( ) and ccosh( ) functions yields -1.53 +0.82*I. 

See Also

ccosh( ), csinh( ), 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