asin, asinf, asinl

计算反正弦值。

语法

double asin( double x );
float asinf ( float x );
long double asinl( long double x );
#define asin(X) // Requires C11 or higher

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

参数

x
要计算反正弦值的值。

返回值

asin 函数返回 -π/2到 π/2 弧度范围内的 x 的反正弦值(反正弦函数)。

默认情况下,如果 x 小于 -1 或大于 1,asin 将返回无穷大。

输入 SEH 异常 _matherr 异常
± INF INVALID _DOMAIN
± QNaN、IND _DOMAIN
|x| > 1 INVALID _DOMAIN

注解

由于 C++ 允许重载,因此你可以调用采用 floatlong double 值的 asin 重载。 在 C 程序中,除非你使用 <tgmath.h> 宏来调用此函数,否则 asin 始终采用并返回 double

如果使用 <tgmath.h> 中的 asin 宏,自变量的类型将确定选择哪个版本的函数。 有关详细信息,请参阅泛型类型数学

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

要求

例程 必需的标头 (C) 必需的标头 (C++)
asin, asinf, asinl <math.h> <cmath><math.h>
asin <tgmath.h>

示例

有关详细信息,请参阅 acosacosfacosl

另请参阅

数学和浮点支持
acosacosfacosl
atanatanfatanlatan2atan2fatan2l
coscosfcosl
_matherr
sinsinfsinl
tantanftanl