Skip to content
Related Articles

Related Articles

JavaScript Math asinh() Method
  • Last Updated : 07 Jul, 2020

Below is the example of the Math asinh( ) Method.

  • Example:




    <script>
       // Here different values is being used for
       // getting hyperbolic sine function's values.
       document.write(Math.asinh(3));
       document.write(Math.asinh(22));
       document.write(Math.asinh(-1));
       document.write(Math.asinh(1));
    </script>
  • Output:
     1.8184464592320668
     3.7847057630994327
    -0.881373587019543
     0.881373587019543
    

The Math.asinh() method is used to get hyperbolic arc-sine of a number. The hyperbolic arc-sine is known by many names such as hyperbolic inverse sine and asinh. It is inverse of the hyperbolic sine function i.e, The inverse hyperbolic sine of any value say x is the value y for which the hyperbolic cosine of y is x.

if y = asinh(x)
then x = sinh(y)
We have,
acosh(x)=ln(x+√ x2+1 )

Syntax:

Math.asinh(x)

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



    • x: Here x is a number whose hyperbolic arc-sine is going to be calculated.

    Return value: It returns the hyperbolic arc-sine of the given number.

    Below examples illustrate the Math asinh() method in JavaScript:

    • Example 1: In this example a positive integer “2” is passed as a parameter in the math.asinh() function.It returns the hyperbolic arc-sine of the passed parameter.
      Input : Math.asinh(2)
      Output : 1.4436354751788103
    • Example 2: In this example “0” is passed as a parameter in the math.asinh() function.It returns the hyperbolic arc-sine of the passed parameter.
      Input : Math.asinh(0)
      Output : 0
    • Example 3: In this example a negative integer “-1” is passed as a parameter in the math.asinh() function.It returns the hyperbolic arc-sine of the passed parameter.
      Input : Math.asinh(-1)
      Output : -0.881373587019543

    More example codes for the above method are as follows:
    Program 1: Whenever we need to get a get hyperbolic arc-sine of a number that time we can take help of Math.asinh() function in JavaScript.




    <script>
        // Here different values is being used
        // for getting hyperbolic cosine function's values.
        document.write(Math.asinh(5)+"<br>");
        document.write(Math.asinh(12));
    </script>

    Output:

     2.3124383412727525
     3.179785437699879
    

    Program 2:




    <script>
        // Here different values is being used
        // for getting hyperbolic cosine function's values.
        document.write(Math.asinh('Geeks')+"<br>");
        document.write(Math.asinh('Geeksforgeeks'));
    </script>    

    Output:

    NaN
    NaN
    

    Supported Browsers:

    • Google Chrome 38.0
    • Internet Explorer 12.0
    • Firefox 25.0
    • Opera 8.0
    • Safari 25.0

    full-stack-img

    My Personal Notes arrow_drop_up
Recommended Articles
Page :