Share via


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 中的反正弦 x 函數,以π/2 弧度。

根據預設,如果 x 小於 -1 或大於 1, asin 則會傳回無限期。

輸入 SEH 例外狀況 _matherr 例外
± INF INVALID _DOMAIN
± QNaN,IND none _DOMAIN
|x| > 1 INVALID _DOMAIN

備註

因為 C++ 允許多載,所以您可以呼叫具有 floatlong double 值的 asin 多載。 在 C 程式中,除非您使用 <tgmath.h> 宏來呼叫此函式, asin 否則一律會採用 並傳 double 回 。

如果您使用 中的 asin<tgmath.h> 宏,引數的類型會決定選取哪一個函式版本。 如需詳細資訊,請參閱 類型泛型數學

根據預設,此函式的全域狀態會限定于應用程式。 若要變更此行為,請參閱 CRT 中的全域狀態。

需求

常式 必要的標頭 (C) 必要的標頭 (C++)
asin, asinf, asinl <math.h> <cmath><math.h>
asin 宏觀 <tgmath.h>

範例

如需詳細資訊,請參閱 acosacosfacosl

另請參閱

數學和浮點支援
acos, acosf, acosl
atan, atanf, atanl, atan2, atan2f, atan2l
cos, cosf, cosl
_matherr
sin, sinf, sinl
tan, tanf, tanl