codecamp

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

Python math 模块  math 模块


描述

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


语法

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

math.asinh(x)

参数说明:

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

返回值

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


实例

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

# 导入 math 包
import math

# 输出反双曲正弦值
print(math.asinh(7))
print(math.asinh(56))
print(math.asinh(2.45))
print(math.asinh(1))

输出结果:

2.644120761058629
4.718578581151767
1.6284998192841909
0.881373587019543

Python math 模块  math 模块


Python3 math.asin()方法 -求反正弦值
Python3 math.atan()方法 -求反正切值
温馨提示
下载编程狮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; }