Thursday, January 22, 2026
HomeLanguagesJavascriptJavaScript Math atanh() Method

JavaScript Math atanh() Method

The Javascript Math.atanh() method is used to return the hyperbolic arctangent of a number. The atanh() is a static method of Math, therefore it is always used as Math.atanh(), rather than as a method of a Math object created.

Math.atanh (x) = arctanh(x) = y such that tanh (y) = x

Syntax: 

Math.atanh(value)

Parameters: This method accepts a single parameter as mentioned above and described below: 

  • value: This parameter holds the number whose hyperbolic arc-tangent you want to know.

Returns: It returns the hyperbolic arc-tangent of the given number.

Below are examples of the Math.atanh() Method. 

Example 1: This example shows the hyperbolic arctangent when 1 is passed as a parameter.

Javascript




console.log("When 1 is passed as a parameter: "
    + Math.atanh(1));


Output

When 1 is passed as a parameter: Infinity

Example 2: This example shows the hyperbolic arctangent when 0 is passed as a parameter.

Javascript




console.log("When 0 is passed as a parameter: "
    + Math.atanh(0));


Output

When 0 is passed as a parameter: 0

Example 3: This example shows the hyperbolic arctangent when 2 is passed as a parameter.

Javascript




console.log("When 2 is passed as a parameter: "
     + Math.atanh(2));


Output

When 2 is passed as a parameter: NaN

Example 4: This example shows the hyperbolic arctangent when 0.5 is passed as a parameter.

Javascript




console.log("When 0.5 is passed as a parameter: "
    + Math.atanh(0.5));


Output

When 0.5 is passed as a parameter: 0.5493061443340548

We have a complete list of Javascript Math Objects methods, to check those please go through this Javascript Math Object Complete reference article.

Supported Browsers:

  • Google Chrome 38.0
  • Firefox 25.0
  • Opera 25.0
  • Safari 8.0
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32475 POSTS0 COMMENTS
Milvus
119 POSTS0 COMMENTS
Nango Kala
6847 POSTS0 COMMENTS
Nicole Veronica
11977 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12064 POSTS0 COMMENTS
Shaida Kate Naidoo
6986 POSTS0 COMMENTS
Ted Musemwa
7220 POSTS0 COMMENTS
Thapelo Manthata
6933 POSTS0 COMMENTS
Umr Jansen
6912 POSTS0 COMMENTS