Python math.sinh() 方法

math.sinh()方法是数学模块的一种库方法,用于获取以弧度为单位的给定数字的双曲正弦值,它接受一个数字并返回双曲正弦值。

注意: math.sinh()方法仅接受数字,如果我们提供除数字以外的其他任何内容,它将返回错误TypeError – “ TypeError:需要浮点数”。

它的语法 math.sinh() 方法:

math.sinh(x)

Parameter(s): x –是要计算其双曲正弦值的数字。

返回值: float-它返回一个浮点值,它是数字x的双曲正弦值。

示例

Input:

x = 1.5

# 函数调用

print(math.sinh(x))

Output:

2.1292794550948173

Python代码演示示例 math.sinh() 方法

# Python代码演示示例

# math.sinh() method

# 导入数学模块

import math

# 数

x = -10

print("math.sinh(",x,"): ", math.sinh(x))

x = 0

print("math.sinh(",x,"): ", math.sinh(x))

x = 1.5

print("math.sinh(",x,"): ", math.sinh(x))

x = 5

print("math.sinh(",x,"): ", math.sinh(x))

x = 15.45

print("math.sinh(",x,"): ", math.sinh(x))

输出结果

math.sinh( -10 ):  -11013.232874703393

math.sinh( 0 ):  0.0

math.sinh( 1.5 ):  2.1292794550948173

math.sinh( 5 ):  74.20321057778875

math.sinh( 15.45 ):  2563419.889913433

TypeError示例

# Python代码演示示例

# math.sinh() method with exception

# 导入数学模块

import math

# 数

x = "2.5"

print("math.sinh(",x,"): ", math.sinh(x))

输出结果

Traceback (most recent call last):

File "/home/main.py", line 9, in

print("math.sinh(",x,"): ", math.sinh(x))

TypeError: a float is required

python math.sinh_带有Python示例的math.sinh()方法相关推荐

  1. sinh_带有Python示例的math.sinh()方法

    sinh Python math.sinh()方法 (Python math.sinh() method) math.sinh() method is a library method of math ...

  2. math.trunc_带有Python示例的math.trunc()方法

    math.trunc Python math.trunc()方法 (Python math.trunc() method) math.trunc() method is a library metho ...

  3. math.atan2_带有Python示例的math.atan2()方法

    math.atan2 Python math.atan2()方法 (Python math.atan2() method) math.atan2() method is a library metho ...

  4. python中acosh_带有Python示例的math.acosh()方法

    python中acosh Python math.acosh()方法 (Python math.acosh() method) math.acosh() method is a library met ...

  5. js math.hypot_带有Python示例的math.hypot()方法

    js math.hypot Python math.hypot()方法 (Python math.hypot() method) math.hypot() method is a library me ...

  6. math.fabs_带有Python示例的math.fabs()方法

    math.fabs Python math.fabs()方法 (Python math.fabs() method) math.fabs() method is a library method of ...

  7. python 语音识别_带有Python的AI –语音识别

    python 语音识别 带有Python的AI –语音识别 (AI with Python – Speech Recognition) In this chapter, we will learn a ...

  8. python遗传算法_带有Python的AI –遗传算法

    python遗传算法 带有Python的AI –遗传算法 (AI with Python – Genetic Algorithms) This chapter discusses Genetic Al ...

  9. python教程cos_带有Python示例的math.cos()方法

    Python math.cos() 方法 math.cos()方法是数学模块的库方法,用于获取弧度数的余弦值,它接受一个数字,返回给定弧度的余弦值. 注意: math.cos()方法接受的唯一的号码, ...

最新文章

  1. mysql left join,right join,inner join用法分析
  2. 困扰一天啦,求大神不吝指导,Camera的onPreviewFrame中的问题
  3. C# 浅拷贝与深拷贝区别 解惑篇
  4. 使用Nginx自带的Realip模块获取用户真实IP
  5. graphql入门_GraphQL入门指南
  6. web前端编程语言有哪些?
  7. Android4火狐,Android版火狐4正式发布
  8. spark TF-IDF入门
  9. postgresql触发器实例
  10. android看图3D,一个相见恨晚的3D手机看图神器,工作效率飙升10倍!
  11. 微信小程序 实时音视频通话
  12. 西安华为 java研发工程师_【华为西安研究所工资】研发工程师待遇-看准网
  13. python3实现图片虚化显示轮廓
  14. cf 936B Sleepy Game
  15. Python 后台启动程序
  16. C补习--------->第六天,二级指针、指针和数组的关系、选择排序
  17. matlab波形相似系数,如何用matlab计算波形相似系数
  18. python编程从入门到实践django-首页
  19. java记事本(一)
  20. .net mvc core网站发布的几种方式

热门文章

  1. 建模助手:Revit中捕捉点设置问题和楼层排序设置
  2. 绘画新手怎么画好结构素描
  3. 投资理财-大跌思考资产配置
  4. 微信数据库最新的解密方式,C++代码解密微信数据库信息!
  5. OMPL138及U-Boot的启动过程分析(一)
  6. 基于Python版本的golang哈希编码
  7. matlab课程设计报告题目,课程设计报告
  8. c语言的奖金发放问题switch,【C语言】企业奖金发放问题
  9. 用自家自己的电脑做网站服务器建立个人网站
  10. 校园无线智能广播系统方案