Math.asinh()
Math.asinh() 静态方法返回数字的逆双曲正弦。即,
试一试
console.log(Math.asinh(1));
// Expected output: 0.881373587019543
console.log(Math.asinh(0));
// Expected output: 0
console.log(Math.asinh(-1));
// Expected output: -0.881373587019543
console.log(Math.asinh(2));
// Expected output: 1.4436354751788103
语法
js
Math.asinh(x)
参数
x-
一个数字。
返回值
x 的逆双曲正弦。
描述
因为 asinh() 是 Math 的静态方法,所以您始终将其用作 Math.asinh(),而不是用作您创建的 Math 对象的(Math 不是构造函数)。
示例
使用 Math.asinh()
js
Math.asinh(-Infinity); // -Infinity
Math.asinh(-1); // -0.881373587019543
Math.asinh(-0); // -0
Math.asinh(0); // 0
Math.asinh(1); // 0.881373587019543
Math.asinh(Infinity); // Infinity
规范
| 规范 |
|---|
| ECMAScript® 2026 语言规范 # sec-math.asinh |
浏览器兼容性
加载中…