asinh(x)函数详解

首页 / C++入门教程 / asinh(x)函数详解

该函数计算以弧度表示的角度的双曲正弦。

其中,双曲正弦的弧线是双曲正弦的倒数。

sinh-1x = asinh(x);

asinh - 语法

假设以弧度表示的角度为" x":

float asinh(float x);
double asinh(double x);
long double asinh(long double x);
double asinh(integral x);

asinh - 参数

x :要计算其双曲正弦值的值。

asinh - 返回值

该函数返回以弧度给出的角度的双曲正弦。

asinh - 例子1

让我们看一个简单的例子,当度的值为整数类型时。

#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。

asinh - 例子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。

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

邱岳的产品实战 -〔邱岳〕

从0开始学大数据 -〔李智慧〕

程序员的数学基础课 -〔黄申〕

TensorFlow快速入门与实战 -〔彭靖田〕

安全攻防技能30讲 -〔何为舟〕

动态规划面试宝典 -〔卢誉声〕

PyTorch深度学习实战 -〔方远〕

去无方向的信 -〔小麥〕

Web 3.0入局攻略 -〔郭大治〕

好记忆不如烂笔头。留下您的足迹吧 :)