sinh

Python math.sinh()方法 (Python math.sinh() method)

math.sinh() method is a library method of math module, it is used to get the hyperbolic sine of given number in radians, it accepts a number and returns hyperbolic sine.

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

Note: math.sinh() method accepts only numbers, if we provide anything else except the number, it returns error TypeError"TypeError: a float is required".

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

Syntax of math.sinh() method:

math.sinh()方法的语法:

    math.sinh(x)

Parameter(s): x – is the number whose hyperbolic sine to be calculated.

参数: x –是要计算其双曲正弦值的数字。

Return value: float – it returns a float value that is the hyperbolic sine value of the number x.

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

Example:

例:

    Input:
x = 1.5
# function call
print(math.sinh(x))
Output:
2.1292794550948173

Python代码演示math.sinh()方法的示例 (Python code to demonstrate example of math.sinh() method)

# Python code to demonstrate example of
# math.sinh() method
# importing math module
import math
# number
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))

Output

输出量

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 example

TypeError示例

# Python code to demonstrate example of
# math.sinh() method with exception
# importing math module
import math
# number
x = "2.5"
print("math.sinh(",x,"): ", math.sinh(x))

Output

输出量

Traceback (most recent call last):
File "/home/main.py", line 9, in <module>
print("math.sinh(",x,"): ", math.sinh(x))
TypeError: a float is required

翻译自: https://www.includehelp.com/python/math-sinh-method-with-example.aspx

sinh

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

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

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

  2. python中 math.isfinite返回值为false_带有Python示例的math.isfinite()方法

    Python math.isfinite() 方法 math.isfinite()方法是数学模块的一种库方法,用于检查给定数字是否为非有限数,它接受数字(整数/浮点数,有限,无限或NaN),如果数字既 ...

  3. python中math.ceil是什么意思_带有Python示例的math.ceil()方法

    Python math.ceil() 方法 math.ceil()方法是数学模块的库方法,用于获取给定数字的ceil值,它接受数字/数字表达式并返回大于该数字的最小整数值. 注意:如果数字是整数值,则 ...

  4. math求旋转角度 python_带有Python示例的math.degrees()方法

    Python math.degrees() 方法 math.degrees()方法是数学模块的一种库方法,用于将角度值从弧度转换为度,它接受一个数字并返回以度为单位的角度值. 注意: math.deg ...

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

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

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

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

  7. np.isfinite_带有Python示例的math.isfinite()方法

    np.isfinite Python math.isfinite()方法 (Python math.isfinite() method) math.isfinite() method is a lib ...

  8. factorial函数_带有Python示例的math.factorial()方法

    factorial函数 Python math.factorial()方法 (Python math.factorial() method) math.factorial() method is a ...

  9. np.copysign_带有Python示例的math.copysign()方法

    np.copysign Python math.copysign()方法 (Python math.copysign() method) math.copysign() method is a lib ...

最新文章

  1. python核心编程第三版_Python之父:自学python,这3本书能节约你一大半时间编程...
  2. 牛津临床和实验室调查手册 Oxford Handbook of Clinical and Laboratory Investigation
  3. C mysql批量写入_使用JDBC在MySQL数据库中快速批量插入数据
  4. 你一直憋着的那个屁,放出来时真的有人知道吗?我先告诉你憋着不放的屁会到哪去……...
  5. 二进制安装mysql5.7
  6. wpf之StackPanel布局
  7. 基于javaWEB技术的SSM音乐网站设计与实现(含论文+程序设计+PPT答辩)
  8. 【接力题典1800记录】不定积分
  9. S5p4418平台AP6212 WIFI稳定性的解决过程
  10. C语言-求绝对值-三目运算符
  11. 积分上限函数求导总结
  12. informix和mysql对接_优化Informix数据库访问
  13. 过压过流保护芯片,IC芯片电路图
  14. 大聪明教你学Java | 深入浅出聊布隆过滤器(Bloom Filter)
  15. matlab的omega0是什么,【铁虫】我喜欢的Omega被别人标记了怎么办(内有嘟嘟)
  16. 微信小程序获取手机号的乱码问题
  17. 【原创】Javaweb篮球俱乐部网站(Web网站毕业设计)
  18. 整理几种List去重的方法
  19. 搭建胜过Apache十倍的Web服务器
  20. iOS开发 - Xcode如何更换iPhone或iPad模拟器的类型

热门文章

  1. [2021-CVPR] Jigsaw Clustering for Unsupervised Visual Representation Learning 论文简析及关键代码简析
  2. linux访问网站出现443,Linux访问网站一直出现超时
  3. linuxpython升级3.5_linux升级python3.5到3.6
  4. python软件_Python自制照片美颜软件~
  5. python无法安装第三方库read time out_解决pip install的时候报错timed out的问题
  6. teamviewer类似软件_TeamViewer系统后台被黑客组织APT攻破,请注意防范
  7. python读写文件操作_详解Python文件读写操作
  8. JDK源码解析之 java.lang.Integer
  9. javaSE知识点汇总
  10. Eclipse安装试用Hanlp