np.cosh没有分配

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

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

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

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

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

Syntax of math.cosh() method:

math.cosh()方法的语法:

    math.cosh(x)

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

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

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

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

Example:

例:

    Input:
x = 1.5
# function call
print(math.cosh(x))
Output:
2.352409615243247

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

# Python code to demonstrate example of
# math.cosh() method
# importing math module
import math
# number
x = -10
print("math.cosh(",x,"): ", math.cosh(x))
x = 0
print("math.cosh(",x,"): ", math.cosh(x))
x = 1.5
print("math.cosh(",x,"): ", math.cosh(x))
x = 5
print("math.cosh(",x,"): ", math.cosh(x))
x = 15.45
print("math.cosh(",x,"): ", math.cosh(x))

Output

输出量

math.cosh( -10 ):  11013.232920103324
math.cosh( 0 ):  1.0
math.cosh( 1.5 ):  2.352409615243247
math.cosh( 5 ):  74.20994852478785
math.cosh( 15.45 ):  2563419.889913628

TypeError example

TypeError示例

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

Output

输出量

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

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

np.cosh没有分配

np.cosh没有分配_Python中带有示例的math.cosh()方法相关推荐

  1. np.cosh没有分配_JavaScript中带有示例的Math.cosh()方法

    np.cosh没有分配 JavaScript | Math.cosh()方法 (JavaScript | Math.cosh() Method) Math operations in JavaScri ...

  2. math.ceil带小数点_Python中带有示例的math.ceil()方法

    math.ceil带小数点 Python math.ceil()方法 (Python math.ceil() method) math.ceil() method is a library metho ...

  3. math.sqrt 有问题_JavaScript中带有示例的Math.sqrt()方法

    math.sqrt 有问题 JavaScript | Math.sqrt()方法 (JavaScript | Math.sqrt() Method) The Math.sqrt() method is ...

  4. arm中clz指令_JavaScript中带有示例的Math.clz32()方法

    arm中clz指令 JavaScript | Math.clz32()方法 (JavaScript | Math.clz32() Method) Math.clz32() is a function ...

  5. np.expm1_JavaScript中带有示例的Math.expm1()方法

    np.expm1 JavaScript | Math.expm1()方法 (JavaScript | Math.expm1() Method) Math operations in JavaScrip ...

  6. math.ceil带小数点_JavaScript中带有示例的Math.ceil()方法

    math.ceil带小数点 JavaScript | Math.ceil()方法 (JavaScript | Math.ceil() Method) Math.ceil() is a function ...

  7. asinh函数_JavaScript中带有示例的Math.asinh()方法

    asinh函数 JavaScript | Math.asinh()方法 (JavaScript | Math.asinh() Method) Math.asinh() is a function in ...

  8. math.trunc_JavaScript中带有示例的Math.trunc()方法

    math.trunc JavaScript | Math.trunc()方法 (JavaScript | Math.trunc() Method) Math.trunc() is a function ...

  9. JavaScript中带有示例的Math.log10()方法

    JavaScript | Math.log10()方法 (JavaScript | Math.log10() Method) Math operations in JavaScript are han ...

最新文章

  1. c语言运算程序,C语言运算符
  2. 84. ExtJS下页面显示中文乱码问题
  3. nginx 超时时间_我眼中的 Nginx(四):是什么让你的 Nginx 服务退出这么慢?
  4. PHP几个防SQL注入攻击自带函数区别
  5. linux mysql makefile_Linux安装库文件(环境变量和makefile)
  6. 解决ftp的pasv模式下iptables设置问题
  7. java txt html格式_java中xml(txt/html等格式)解析问题,请教java高手,请勿粘贴其他网页上的内容(能查的都看了)。...
  8. linux---基础04
  9. elasticsearch scroll 一页最大数据量_elasticsearch 百亿级数据检索案例与原理
  10. 东莞市商业学校计算机平面设计在哪个校区,东莞市商业学校
  11. 如何在logcat中获取多个tag标签的过滤信息
  12. python大学随机点名名_python用tkinter实现一个简易能进行随机点名的界面
  13. slf4j log4j logback关系详解和相关用法
  14. quartus波形仿真破解MODELSIM
  15. Matlab程序——修正鲍威尔Powell法
  16. 如何改变Android-studio中的APP的名字和图标
  17. 张朝阳夜跑33公里:直播聊物理 揭示“超级月亮”成因
  18. 原生JS实现动态返回顶部
  19. 将视频转换成一帧帧的图片
  20. 【数据库基础】正则化(Normalization)P1:UNF、1NF、2NF、3NF

热门文章

  1. “ IMY”是什么意思,如何使用?
  2. rasterio实用教程(4)——坐标系转换
  3. OCT-模拟集成电路设计的九个境界
  4. 腾讯X5 浏览器内核加载
  5. sql2005java驱动_sqljdbc.jar 2005
  6. 什么是web服务器?有哪些作用?
  7. Authorization头的作用
  8. 【xss-labs】闯关记录16~18
  9. 使用ethers.js执行读函数与写函数
  10. DC基础知识介绍-Design Compiler(二)