Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

javascript
math
acosh
communitycreator

# What is Math.acosh() in JavaScript? Arslan Bajwa

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

In JavaScript, Math is a built-in object that contains different methods and properties used to perform mathematical operations. It contains an acosh() function, which is used to compute the hyperbolic arc-cosine of a specified number. This is also known as the inverse hyperbolic cosine.

## Syntax

Math.acosh(param);

## Parameter

• param: This is the number for which we want to compute the hyperbolic arc-cosine. Its type is Number and it is measured in radians. Its range is:
• param >= 1

Number in JavaScript is a 64-bit double-precision value which is the same as double in C# or Java.

## Return value

• Number: It returns the angle whose hyperbolic cosine is equal to param. It is of Number type.

• NaN: The function returns this if param < 1 or Infinity.

• +Infinity: The function returns this if param is +Infinity.

To convert degrees into radians, use the following formula:

• Degrees = Radians x 180 / π

where π = 3.14159, approximately

## Example

console.log("acosh(-1) = " + Math.acosh(-1));console.log("acosh(10) = " + Math.acosh(10));console.log("acosh(1) = " + Math.acosh(1));console.log("acosh(∞) = " + Math.acosh(Infinity));console.log("acosh(-∞) = " + Math.acosh(-Infinity));

RELATED TAGS

javascript
math
acosh
communitycreator

CONTRIBUTOR Arslan Bajwa

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring

Learn in-demand tech skills in half the time 