Math.asinh( ) In JavaScript

Math.asinh()
Math.asinh() function is used to return the hyperbolic arc-sine of a number. asinh() is a static method of Math,
therefore it is always used as Math.asinh(), rather than as a method of a math object created.

Syntax:

Math.asinh(value)

Parameter Used:
1. value:It is the number whose hyperbolic arc-sine you want to know.

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

Examples for the above function are provided below.

Example 1:

Input : Math.asinh(2)
Output : 1.4436354751788103

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.

Example 2:

Input : Math.asinh(0)
Output : 0

In this example “0” is passed as a parameter in the math.asinh() function.It returns the hyperbolic arc-sine of the passed parameter.

Example 3:

Input : Math.asinh(-1)
Output : -0.881373587019543

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.

    Codes for the above function are provided below.

    Program 1 :

          <script type = "text/javascript">
    
             // 2 is passed as a parameter
             document.write("OUTPUT : " + Math.asinh(2));
          </script>
          
    
    

    OUTPUT:

    OUTPUT : 1.4436354751788103

    Program 2:

          <script type = "text/javascript">
    
             // 0 is passed as a parameter
             document.write("OUTPUT : " + Math.asinh(0));
          </script>
          
    
    

    OUTPUT:

    OUTPUT : 0

    Program 3:

          <script type = "text/javascript">
    
             // 1 is passed as a parameter
             document.write("OUTPUT : " + Math.asinh(1));
          </script>
          
    
    

    OUTPUT:

    OUTPUT : 0.881373587019543

    Program 4:

          <script type = "text/javascript">
    
             // -1 is passed as a parameter
             document.write("OUTPUT : " + Math.asinh(-1));
          </script>
          
    
    

    OUTPUT:

    OUTPUT : -0.881373587019543

I am a technology enthusiast who has a keen interest in programming. I am pursuing Engineering in Computer Science from GEU, Dehradun. I like to unwind by watching movies and English sitcoms.I have a keen interest in music.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

GATE CS Corner    Company Wise Coding Practice

Recommended Posts:



0 Average Difficulty : 0/5.0
No votes yet.