Math.atanh()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2015ë 7ì.
Math.atanh() ì ì ë©ìëë ì«ìì ìì곡 íì í¸ë¥¼ ë°íí©ëë¤. ì´ë ë¤ìê³¼ ê°ìµëë¤.
ìëí´ ë³´ê¸°
console.log(Math.atanh(-1));
// Expected output: -Infinity
console.log(Math.atanh(0));
// Expected output: 0
console.log(Math.atanh(0.5));
// Expected output: 0.549306144334055 (approximately)
console.log(Math.atanh(1));
// Expected output: Infinity
구문
js
Math.atanh(x)
매ê°ë³ì
x-
-1 ì´ì 1 ì´í ì«ì
ë°í ê°
xì ì ì곡 íì í¸. xê° 1ì´ë¼ë©´ Infinity를 ë°íí©ëë¤. xê° -1 ì´ë¼ë©´ -Infinityì ë°íí©ëë¤. xê° -1ë³´ë¤ ìê±°ë 1ë³´ë¤ í¬ë¤ë©´ NaNì ë°íí©ëë¤.
ì¤ëª
Mathì ì ì ë©ìëì´ê¸° ë문ì atanh()ë ìì±í Math ê°ì²´(Mathë ìì±ìê° ìëëë¤)ì ë©ìë를 ì¬ì©í기보ë¤ë ì¸ì ë Math.atanh()를 ì¬ì©íì¸ì.
ìì
>Math.atanh() ì¬ì©í기
js
Math.atanh(-2); // NaN
Math.atanh(-1); // -Infinity
Math.atanh(-0); // -0
Math.atanh(0); // 0
Math.atanh(0.5); // 0.5493061443340548
Math.atanh(1); // Infinity
Math.atanh(2); // NaN
ëª ì¸ì
| Specification |
|---|
| ECMAScript® 2027 Language Specification> # sec-math.atanh> |