JavaScript Math.asinh()
Syntax & Examples


Math.asinh() static-method

The Math.asinh() method in JavaScript returns the hyperbolic arcsine of a number. The hyperbolic arcsine of x is the unique number y such that sinh(y) = x, where sinh is the hyperbolic sine function.


Syntax of Math.asinh()

The syntax of Math.asinh() static-method is:

Math.asinh(x)

This asinh() static-method of Math returns the hyperbolic arcsine of a number.

Parameters

ParameterOptional/RequiredDescription
xrequiredA number for which to return the hyperbolic arcsine.

Return Type

Math.asinh() returns value of type Number.



✐ Examples

1 Using Math.asinh() with a positive number

In JavaScript, we can use the Math.asinh() method to get the hyperbolic arcsine of a positive number.

For example,

  1. We call the Math.asinh() method with a positive number x.
  2. The hyperbolic arcsine value is returned and stored in the variable result.
  3. We log result to the console using console.log() method.

JavaScript Program

const x = 1;
const result = Math.asinh(x);
console.log(result);

Output

0.881373587019543

2 Using Math.asinh() with zero

In JavaScript, we can use the Math.asinh() method to get the hyperbolic arcsine of zero.

For example,

  1. We call the Math.asinh() method with zero x.
  2. The hyperbolic arcsine value is returned and stored in the variable result.
  3. We log result to the console using console.log() method.

JavaScript Program

const x = 0;
const result = Math.asinh(x);
console.log(result);

Output

0

3 Using Math.asinh() with a negative number

In JavaScript, we can use the Math.asinh() method to get the hyperbolic arcsine of a negative number.

For example,

  1. We call the Math.asinh() method with a negative number x.
  2. The hyperbolic arcsine value is returned and stored in the variable result.
  3. We log result to the console using console.log() method.

JavaScript Program

const x = -1;
const result = Math.asinh(x);
console.log(result);

Output

-0.881373587019543

Summary

In this JavaScript tutorial, we learned about asinh() static-method of Math: the syntax and few working examples with output and detailed explanation for each example.