ctan


ctan

Calculates the tangent of a complex number

 #include <complex.h> double complex ctan ( double complex z  ); float complex ctanf ( float complex z  ); long double complex ctanl ( long double complex z  ); 

The ctan( ) function returns the tangent of its complex number argument z, which is equal to sin(z) / cos(z).

Example

 double complex z = - 0.53 + 0.62 * I; double complex c, d; c = ctan( z ); d = csin( z ) / ccos( z ); printf("The ctan( ) function returns %.2f %+.2f \xD7 I.\n",        creal(c), cimag(c) ); printf("Using the csin( ) and ccos( ) functions yields %.2f %+.2f \xD7 I.\n",        creal(d), cimag(d) ); 

This code produces the following output:

 The ctan( ) function returns -0.37 +0.67 x I. Using the csin( ) and ccos( ) functions yields -0.37 +0.67 x I. 

See Also

csin( ), ccos( ), cacos( ), casin( ), catan( )



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