December 2005
Beginner to intermediate
618 pages
20h 19m
English
csinh
Calculates the hyperbolic sine of a complex number
#include <complex.h> double complexcsinh( double complexz); float complexcsinhf( float complexz); long double complexcsinhl( long double complexz);
The hyperbolic sine of a complex number
z is equal to
(exp(z) −
exp(−z)) / 2. The csinh functions return the hyperbolic sine
of their complex argument.
double complex v, w, z = -1.2 + 3.4 * I;
v = csinh( z );
w = 0.5 * ( cexp(z) − cexp(−z) );
printf( "The csinh() function returns %.2f %+.2f*I.\n",
creal(v), cimag(v) );
printf( "Using the cexp() function, the result is %.2f %+.2f*I.\n",
creal(w), cimag(w) );This code produces the following output:
The csinh() function returns 1.46 -0.46*I. Using the cexp() function, the result is 1.46 -0.46*I.
Read now
Unlock full access