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
為無訊息 NaN、不確定或無限大,則會傳回相同的值。
輸入 | SEH 例外狀況 | _matherr 例外 |
---|---|---|
± QNaN、IND、INF | none | none |
備註
當您使用 C++ 時,可以呼叫採用並傳回 asinh
或 float
值的 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
另請參閱
數學和浮點支援
acosh
, acoshf
, acoshl
atanh
, atanhf
, atanhl
cosh
, coshf
, coshl
sinh
, sinhf
, sinhl
tanh
, tanhf
, tanhl
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應