Name
casin
Synopsis
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].
Example
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
Get C in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.