csin


csin

Calculates the sine of a complex number

 #include <complex.h> double complex csin ( double complex z  ); float complex csinf ( float complex z  ); long double complex csinl ( long double complex z  ); 

The csin( ) function returns the sine of its complex number argument z, which is equal to (eiz - e-iz)/2 x i.

Example

 /* Demonstrate the exponential definition of the complex sine function. */ double complex z = 4.3 - 2.1 * I; double complex c, d; c = csin( z ); d = ( cexp( z * I ) - cexp( - z * I )) / (2 * I); printf("The csin( ) function returns %.2f %+.2f \xD7 I.\n",        creal(c), cimag(c) ); printf("Using the cexp( ) function, the result is %.2f %+.2f \xD7 I.\n",        creal(d), cimag(d) ); 

This code produces the following output:

 The csin( ) function returns -3.80 +1.61 x I. Using the cexp( ) function, the result is -3.80 +1.61 x I. 

See Also

ccos( ), ctan( ), 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