December 2005
Beginner to intermediate
618 pages
20h 19m
English
casinh
Calculates the inverse hyperbolic sine of a number
include <complex.h> double complexcasinh( double complexz); float complexcasinhf( float complexz); long double complexcasinhl( long double complexz);
The casinh() functions
return the complex number whose hyperbolic sine is equal to their
argument z.
double complex v, w, z ;
double a = 0.0, b = 0.0;
puts("Enter the real and imaginary parts of a complex number:");
if ( scanf("%lf %lf", &a, &b) == 2)
{
z = a + b * I;
printf( "z = %.2f %+.2f*I.\n", creal(z), cimag(z) );
v = casin(z);
w =casinh(z);
printf( "z is the sine of %.2f %+.2f*I\n", creal(v), cimag(v) );
printf( "and the hyperbolic sine of %.2f %+.2f*I.\n",
creal(w), cimag(w) );
}
else
printf("Invalid input. \n");Read now
Unlock full access