javascript 中的 Math.asinh() 和 Math.acosh() 函数有何用途?
Math.asinh() 和 Math.acosh() 函数分别用于计算某个数的双曲反正弦和双曲反正切值。这些函数是 Math 的静态方法,因此它们总是被用作 Math.asinh() 和 Math.acosh(), 而不是作为创建的数学对象的函数。
Math.asinh()
该方法用于计算某个数的双曲反正弦值。它将一个数作为参数,并返回双曲正弦值。
示例
<html>
<body>
<script>
document.write(Math.asinh(2));
document.write("</br>");
document.write(Math.asinh(7));
</script>
</body>
</html>输出
1.4436354751788103 2.644120761058629
Math.acosh()
该方法用于计算某个数的双曲反正切值。它将一个数作为参数,并返回双曲正切值。
示例
<html>
<body>
<script>
document.write(Math.acosh(2));
document.write("</br>");
document.write(Math.acosh(7));
</script>
</body>
</html>输出
1.3169578969248166 2.6339157938496336
广告
数据结构
网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP