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++ 允許多載,所以您可以呼叫具有 float
和 long double
值的 asin
多載。 在 C 程式中,除非您使用 <tgmath.h>
宏來呼叫此函式, asin
否則一律會採用 並傳 double
回 。
如果您使用 中的 asin
<tgmath.h>
宏,引數的類型會決定選取哪一個函式版本。 如需詳細資訊,請參閱 類型泛型數學 。
根據預設,此函式的全域狀態會限定于應用程式。 若要變更此行為,請參閱 CRT 中的全域狀態。
需求
常式 | 必要的標頭 (C) | 必要的標頭 (C++) |
---|---|---|
asin , asinf , asinl |
<math.h> |
<cmath> 或 <math.h> |
asin 宏觀 |
<tgmath.h> |
範例
如需詳細資訊,請參閱 acos
、 acosf
acosl
。
另請參閱
數學和浮點支援
acos
, acosf
, acosl
atan
, atanf
, atanl
, atan2
, atan2f
, atan2l
cos
, cosf
, cosl
_matherr
sin
, sinf
, sinl
tan
, tanf
, tanl
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應