Name

casinh

Synopsis

Calculates the inverse hyperbolic sine of a number

include <complex.h>
double complexcasinh( double complex z );
float complex casinhf( float complex z );
long double complex casinhl( long double complex z );

The casinh() functions return the complex number whose hyperbolic sine is equal to their argument z.

Example

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");

See Also

cacosh(), catanh(), ccosh(), csinh(), ctanh(); the hyperbolic trigonometry functions for real numbers: acosh(), atanh(), sinh(), cosh(), and tanh()

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.