asinh Function

Calculates the arc hyperbolic sine function of a double precision floating-point value.

Include

<math.h>

Prototype

double asinh(double x);

Argument

x
value for which to return the arc hyperbolic sine

Return Value

Returns the arc hyperbolic sine of x.

Example

See the notes at the beginning of this chapter or section for information on using printf() or scanf() (and other functions reading and writing the stdin or stdout streams) in the example code.

#include <math.h>
#include <stdio.h>
#include <errno.h>

int main(void)
{
  double x, y;

  errno = 0;
  x = -1.0;
  y = asinh(x);
  if (errno)
    perror("Error");
  printf("The arc hyperbolic sine of %f is %f\n", x, y);

  errno = 0;
  x = 1.0;
  y = asinh(x);
  if (errno)
    perror("Error");
  printf("The arc hyperbolic sine of %f is %f\n", x, y);

  errno = 0;
  x = 720.0;
  y = asinh(x);
  if (errno)
    perror("Error");
  printf("The arc hyperbolic sine of %f is %f\n", x, y);
}

Example Output

The arc hyperbolic sine of -1.000000 is -0.881374
The arc hyperbolic sine of 1.000000 is 0.881374
The arc hyperbolic sine of 720.000000 is 7.272399