ADVERTISEMENT
ADVERTISEMENT

# Math.atanh() Method with Example in JavaScript

JavaScript | Math.atanh() Method: Here, we are going to learn about the atanh() method of Math class in JavaScript with Examples.
Submitted by Shivang Yadav, on December 21, 2019

## JavaScript | Math.atanh() Method

Math.atanh() is a function in math library of JavaScript that is used to find the value of hyperbolic arctangent of a number.

Syntax:

```    Math.atan(p);
```

Parameter(s):

• p – It represents the value whose hyperbolic arctangent value to be found.

Return value:

The return type of this method is number, it returns the hyperbolic arctangent value of the given p.

Example 1: Valid values for the method

```console.log(Math.atanh(0));
console.log(Math.atanh(0.34));
console.log(Math.atanh(-0.6));
```

Output

```0
0.35409252896224297
-0.6931471805599453
```

Example 2: Invalid values for the method.

```console.log(Math.atanh("IncludeHelp"));
// Output: NaN

console.log(Math.atanh(4));
// Output: NaN

console.log(Math.atanh(1 + 5i));
// Output: Uncaught SyntaxError: Invalid or unexpected token
```

ADVERTISEMENT
ADVERTISEMENT

Preparation

What's New

ADVERTISEMENT

Top Interview Coding Problems/Challenges!

ADVERTISEMENT

ADVERTISEMENT

Comments and Discussions!

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.