December 2005
Beginner to intermediate
618 pages
20h 19m
English
casin
Calculates the inverse sine of a complex number
#include <complex.h> double complexcasin( double complexz); float complexcasinf( float complexz); long double complexcasinl( long double complexz);
The casin() functions
accept a complex number as their argument and return a complex
number, but otherwise work the same as asin(). The real part of the return value
is in the interval [-π/2, π/2].
puts("Results of the casin() function for integer values:");
float complex z = 0;
for ( int n = -3; n <= 3; ++n)
{
z = casinf(n);
printf(" casin(%+d) = %+.2f %+.2f*I\n", n, crealf(z), cimagf(z) );
}This code produces the following output:
Results of the casin() function for integer values: casin(-3) = -1.57 +1.76*I casin(-2) = -1.57 +1.32*I casin(-1) = -1.57 -0.00*I casin(+0) = +0.00 +0.00*I casin(+1) = +1.57 -0.00*I casin(+2) = +1.57 +1.32*I casin(+3) = +1.57 +1.76*I
Read now
Unlock full access