該函數計算以弧度給出的角度的雙曲正弦值。
數學上
sinhx = (ex-e-x/2
用法
假設雙曲角為 x:
float sinh(float x);
double sinh(double x);
long double sinh(long double x);
double sinh(integral x);
參數
x:代表雙曲角的值。
返回值
它返回一個角度的雙曲正弦值。
例子1
讓我們看一個簡單的例子。
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
int x=90;
float radian=x*3.14/180;
std::cout << "Value of degree is:" << x<<std::endl;
cout<<"sinh(radian):"<<sinh(radian);
return 0;
}
輸出:
Value of degree is:90 sinh(radian):2.2993
在此示例中,sinh() 函數計算角度 90 的雙曲正弦值並返回值 2.2993
例子2
讓我們看另一個簡單的例子。
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
float x=56.4;
float radian=x*3.14/180;
std::cout << "Value of degree is:" << x<<std::endl;
cout<<"sinh(radian):"<<sinh(radian);
return 0;
}
輸出:
Value of degree is:56.4 sinh(radian):1.15046
在此示例中,sinh() 函數計算角度 56.4 的雙曲正弦值並返回值 1.15。
相關用法
- C++ Math sin()用法及代碼示例
- C++ Math signbit()用法及代碼示例
- C++ Math scalbn()用法及代碼示例
- C++ Math scalbln()用法及代碼示例
- C++ Math sqrt()用法及代碼示例
- C++ Math acosh()用法及代碼示例
- C++ Math asinh()用法及代碼示例
- 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 cosh()用法及代碼示例
- C++ Math fma()用法及代碼示例
注:本文由純淨天空篩選整理自 C++ Math sinh()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。