共用方式為


asin、 、 asinfasinl

計算反正弦值。

語法

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、 、 asinfasinl <math.h> <cmath><math.h>
asin 巨集 <tgmath.h>

範例

如需詳細資訊,請參閱acosacosfacosl

另請參閱

數學與浮點支援
acos、 、 acosfacosl
atan、、atanfatanlatan2、、atan2fatan2l
cos、 、 cosfcosl
_matherr
sin、 、 sinfsinl
tan、 、 tanftanl