Edit

Share via


asinh, asinhf, asinhl

Calculates the inverse hyperbolic sine.

Syntax

double asinh( double x );
float asinhf( float x );
long double asinhl( long double x );
#define asinh(X) // Requires C11 or higher

float asinh( float x );  // C++ only
long double asinh( long double x );  // C++ only

Parameters

x
Floating-point value.

Return value

The asinh functions return the inverse hyperbolic sine (arc hyperbolic sine) of x. This function is valid over the floating-point domain. If x is a quiet NaN, indefinite, or infinity, the same value is returned.

Input SEH exception _matherr exception
± QNaN, IND, INF none none

Remarks

When you use C++, you can call overloads of asinh that take and return float or long double values. In a C program, unless you're using the <tgmath.h> macro to call this function, asinh always takes and returns double.

If you use the <tgmath.h> asinh() macro, the type of the argument determines which version of the function is selected. See Type-generic math for details.

By default, this function's global state is scoped to the application. To change this, see Global state in the CRT.

Requirements

Function Required C header Required C++ header
asinh, asinhf, asinhl <math.h> <cmath> or <math.h>
asinh() macro <tgmath.h>

For additional compatibility information, see Compatibility.

Example

// crt_asinh.c
// Compile by using: cl /W4 crt_asinh.c
// This program displays the hyperbolic sine of pi / 4
// and the arc hyperbolic sine of the result.

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

int main( void )
{
   double pi = 3.1415926535;
   double x, y;

   x = sinh( pi / 4 );
   y = asinh( x );
   printf( "sinh( %f ) = %f\n", pi/4, x );
   printf( "asinh( %f ) = %f\n", x, y );
}
sinh( 0.785398 ) = 0.868671
asinh( 0.868671 ) = 0.785398

See also

Math and floating-point support
acosh, acoshf, acoshl
atanh, atanhf, atanhl
cosh, coshf, coshl
sinh, sinhf, sinhl
tanh, tanhf, tanhl