asinh, asinhf, asinhl

计算反双曲正弦。

语法

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

参数

x
浮点值。

返回值

asinh 函数返回 x 的反双曲正弦(弧双曲正弦)。 此函数在浮点域上有效。 如果 x 是 quiet NaN、不确定数或无穷大,则将返回相同的值。

输入 SEH 异常 _matherr 异常
± QNaN、IND、INF

注解

使用 C++ 时,你可以调用采用并返回 asinhfloat 值的 long double 重载。 在 C 程序中,除非使用 <tgmath.h> 宏调用此函数,否则 asinh 始终采用并返回 double

如果使用 <tgmath.h>asinh() 宏,则参数的类型将决定选择哪个版本的函数。 有关详细信息,请参阅泛型类型数学

默认情况下,此函数的全局状态范围限定为应用程序。 若要更改此状态,请参阅 CRT 中的全局状态

要求

函数 必需的 C 标头 必需的 C++ 标头
asinh, asinhf, asinhl <math.h> <cmath> 或 <math.h>
asinh() <tgmath.h>

有关其他兼容性信息,请参阅 Compatibility

示例

// 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

另请参阅

数学和浮点支持
acoshacoshfacoshl
atanhatanhfatanhl
coshcoshfcoshl
sinhsinhfsinhl
tanhtanhftanhl