Movatterモバイル変換


[0]ホーム

URL:


  1. 개발자를 위한 웹 기술
  2. JavaScript
  3. JavaScript 참고서
  4. 표준 내장 객체
  5. Math
  6. Math.atanh()

This page was translated from English by the community.Learn more and join the MDN Web Docs community.

View in EnglishAlways switch to English

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() 정적 메서드는 숫자의 역쌍곡 탄젠트를 반환합니다. 이는 다음과 같습니다.

x(1,1),𝙼𝚊𝚝𝚑.𝚊𝚝𝚊𝚗𝚑(𝚡)=artanh(x)=the unique y such that tanh(y)=x=12ln(1+x1x)\begin{aligned}\forall x \in ({-1}, 1),\;\mathtt{\operatorname{Math.atanh}(x)} &= \operatorname{artanh}(x) = \text{the unique } y \text{ such that } \tanh(y) = x \\&= \frac{1}{2}\,\ln\left(\frac{1+x}{1-x}\right)\end{aligned}

시도해 보기

console.log(Math.atanh(-1));// Expected output: -Infinityconsole.log(Math.atanh(0));// Expected output: 0console.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); // NaNMath.atanh(-1); // -InfinityMath.atanh(-0); // -0Math.atanh(0); // 0Math.atanh(0.5); // 0.5493061443340548Math.atanh(1); // InfinityMath.atanh(2); // NaN

명세서

Specification
ECMAScript® 2026 Language Specification
# sec-math.atanh

브라우저 호환성

같이 보기

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp