Math.asinh()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Phương thức tĩnh Math.asinh() trả về arcsin hyperbolic của một số. Cụ thể:

𝙼𝚊𝚝𝚑.𝚊𝚜𝚒𝚗𝚑(𝚡)=arsinh(x)=the unique y such that sinh(y)=x=ln(x+x2+1)\begin{aligned}\mathtt{\operatorname{Math.asinh}(x)} &= \operatorname{arsinh}(x) = \text{the unique } y \text{ such that } \sinh(y) = x \\&= \ln\left(x + \sqrt{x^2 + 1}\right)\end{aligned}

Try it

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

Cú pháp

js
Math.asinh(x)

Tham số

x

Một số.

Giá trị trả về

Arcsin hyperbolic của x.

Mô tả

asinh() là một phương thức tĩnh của Math, bạn luôn sử dụng nó dưới dạng Math.asinh(), thay vì là phương thức của một đối tượng Math bạn tạo ra (Math không phải là constructor).

Ví dụ

Sử dụng 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

Đặc tả kỹ thuật

Thông số kỹ thuật
ECMAScript® 2027 Language Specification
# sec-math.asinh

Tương thích trình duyệt

Xem thêm