codecamp

Python3 math.sinh() 方法 - 求双曲正弦值

Python math 模块  math 模块


描述

math.sinh(x) 返回 x 的双曲正弦值。


语法

math.sinh() 方法语法如下:

math.sinh(x)

参数说明:

  • x -- 必需,个正数或负数。如果 x 不是一个数字,返回 TypeError。

返回值

返回一个浮点数,表示一个数字的双曲正弦值。


实例

以下实例返回不同数字的双曲正弦值:

# 导入 math 包
import math

# 输出双曲正弦值
print(math.sinh(0.00))
print(math.sinh(-23.45))
print(math.sinh(23))
print(math.sinh(1.00))
print(math.sinh(math.pi))

输出结果:

0.0
-7641446994.979367
4872401723.124452
1.1752011936438014
11.548739357257746

Python math 模块  math 模块


Python3 math.sin() 方法 -求正弦值
Python3 math.sqrt() 方法 -求平方根
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

相关教程

Python基础教程

python内置库

python3 math模块

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }