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 Alsoccos( ), ctan( ), cacos( ), casin( ), catan( ) |