C ++中的asinh()函數(shù)返回弧度數(shù)的反雙曲正弦(反雙曲正弦)。
asinh()函數(shù)采用單個參數(shù),并以弧度返回該值的反雙曲正弦值。
該函數(shù)在<cmath>頭文件中定義。
sinh-1 x = asinh(x)
double asinh(double x); float asinh(float x); long double asinh(long double x); double asinh(T x); //為整型
asinh()函數(shù)采用一個必需的自變量,其反雙曲正弦值將被計算。
它可以是任何值,即負,正或零。
asinh()函數(shù)以弧度返回參數(shù)的反雙曲正弦值。
#include <iostream> #include <cmath> #define PI 3.141592654 using namespace std; int main() { double x = -6.82, result; result = asinh(x); cout << "asinh(x) = " << result << " radian" << endl; cout << "asinh(x) = " << result*180/PI << " degree" << endl; return 0; }
運行該程序時,輸出為:
asinh(x) = -2.61834 radian asinh(x) = -150.02 degree
#include <iostream> #include <cmath> #define PI 3.141592654 using namespace std; int main() { int x = 11; double result; result = asinh(x); cout << "asinh(x) = " << result << " radian" << endl; cout << "asinh(x) = " << result*180/PI << " degree" << endl; return 0; }
運行該程序時,輸出為:
asinh(x) = 3.0931 radian asinh(x) = 177.222 degree