Math.atanh() function in JavaScript


The atanh() function of the Math object accepts a number and returns its hyperbolic arc arctangent value in radians. To convert the resultant value into degrees, multiply it with 180 and divide the result by 3.14159 (pi value).

Syntax

Its Syntax is as follows

Math.atanh(0.5)

Example

 Live Demo

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var result = Math.atanh(0.5);
      document.write("arctangent value: "+result);
      document.write("<br>");
      document.write("hyperbolic arctangent value in degrees: "+result*180/Math.PI);
   </script>
</body>
</html>

Output

arctangent value: 0.5493061443340548
arctangent value in degrees: 31.47292373094538

Updated on: 25-Jun-2020

23 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements