該函數計算以弧度給定的角度的弧雙曲正弦值。
其中,雙曲正弦的弧是雙曲正弦的倒數。
信-1x = asinh(x);
用法
假設以弧度給出的角度是 'x':
float asinh(float x);
double asinh(double x);
long double asinh(long double x);
double asinh(integral x);
參數
x: 要計算其反雙曲正弦值的值。
返回值
該函數返回以弧度給定的角度的弧雙曲正弦值。
例子1
讓我們看一個簡單的例子,當 degree 的值是整數類型時。
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
int degree =90;
float x = degree*3.14/180;
std::cout << "Value of degree is:" <<degree<< std::endl;
cout<<"sinh(x):"<<sinh(x)<<'\n';
cout<<"asinh(x):"<<asinh(x);
return 0;
}
輸出:
Value of degree is:90 sinh(x):2.2993 asinh(x):1.23298
在此示例中,asinh() 計算 x 的反雙曲正弦值並返回值 1.23。
例子2
讓我們看一個簡單的例子,當 degree 的值是 float 類型時。
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
float degree = 45.5;
float x = degree*3.14/180;
std::cout << "Value of degree is:" <<degree<< std::endl;
cout<<"sinh(x):"<<sinh(x)<<'\n';
cout<<"asinh(x):"<<asinh(x);
return 0;
}
輸出:
Value of degree is:45.5 sinh(x):0.879727 asinh(x):0.727759
在本例中,asinh() 函數計算 x 的反雙曲正弦值並返回值 0.72。
相關用法
- C++ Math asin()用法及代碼示例
- C++ Math acosh()用法及代碼示例
- C++ Math atan()用法及代碼示例
- C++ Math atan2()用法及代碼示例
- C++ Math abs()用法及代碼示例
- C++ Math acos()用法及代碼示例
- C++ Math atanh()用法及代碼示例
- C++ Math scalbn()用法及代碼示例
- C++ Math isgreater()用法及代碼示例
- C++ Math fabs()用法及代碼示例
- C++ Math islessgreater()用法及代碼示例
- C++ Math log2()用法及代碼示例
- C++ Math nearbyint()用法及代碼示例
- C++ Math tan()用法及代碼示例
- C++ Math log()用法及代碼示例
- C++ Math nextafter()用法及代碼示例
- C++ Math fdim()用法及代碼示例
- C++ Math isfinite()用法及代碼示例
- C++ Math erfc()用法及代碼示例
- C++ Math sinh()用法及代碼示例
注:本文由純淨天空篩選整理自 C++ Math asinh()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。