JavaScript Math sinh()

The JavaScript Math.sinh() function returns the hyperbolic sine of a number.

It is equivalent to (ex - e-x)/2 in mathematics.

The syntax of the Math.sinh() function is:

Math.sinh(x)

sinh(), being a static method, is called using the Math class name.


Math.sinh() Parameters

The Math.sinh() function takes in:

  • x - A number

Return value from Math.sinh()

  • Returns the hyperbolic sine of the given number.

Example: Using Math.sinh()

// Math.sinh(x) is (e**(x) - e**(-x))/2

var num = Math.sinh(0);
console.log(num); // 0

var num = Math.sinh(1);
console.log(num); // 1.1752011936438014

var num = Math.sinh(-1);
console.log(num); // -1.1752011936438014

var num = Math.sinh(2);
console.log(num); // 3.626860407847019

Output

0
1.1752011936438014
-1.1752011936438014
3.626860407847019

Recommended readings: