A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/javascript-math-atanh-method/ below:

JavaScript Math atanh() Method - GeeksforGeeks

JavaScript Math atanh() Method

Last Updated : 12 Jul, 2024

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: 

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:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4