# Acosh Math Homework

The function returns the hyperbolic arc-cosine of a number, that is

The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.

## Syntax

### Parameters

- A number.

### Return value

The hyperbolic arc-cosine of the given number. If the number is less than **1**, .

## Description

Because is a static method of , you always use it as , rather than as a method of a object you created ( is no constructor).

## Examples

### Using

Math.acosh(-1); // NaN Math.acosh(0); // NaN Math.acosh(0.5); // NaN Math.acosh(1); // 0 Math.acosh(2); // 1.3169578969248166For values less than 1 returns .

## Polyfill

For all , we have and so this can be emulated with the following function:

Math.acosh = Math.acosh || function(x) { return Math.log(x + Math.sqrt(x * x - 1)); };## Specifications

## Browser compatibility

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|

Basic support | 38 | Yes | 25 | No | 25 | 8 |

Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|---|---|

Basic support | Yes | Yes | Yes | 25 | Yes | 8 | ? |

Desktop | Mobile | Server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | Node.js | |

Basic support | Full support 38 | Full support Yes | Full support 25 | No support No | Full support 25 | Full support 8 | Full support Yes | Full support Yes | Full support Yes | Full support 25 | Full support Yes | Full support 8 | ? | Full support Yes |

### Legend

- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown

## See also

Math assignments are quizzes that allow you to enter math functions and certain constants.

Before you submit your assignment, you'll be able to preview your answer to see what the grader will see.

You can use basic symbols for addition (+), subtraction (-), multiplication (*), division (/), and power/exponential (^).

You need to use (*) for multiplication every time. For example, "3x" should be "3*x" instead.

### Function Syntax

Math assignments accept the following basic and advanced functions.

You can enter these math functions in the form of function(value). For example, the square root of 17 should be entered as sqrt(17). The cosine function of 5x should be entered as cos(5*x).

**Basic numeric functions**

- abs (absolute value)
- max
- min
- mod
- ceiling
- floor
- gcd (greatest common denominator; 2 arguments only, enter three or more arguments as "gcd((a, b, c, d))" or "gcd([a, b, c, d])" e.g. a list/tuple)
- lcm (least common multiple; 2 arguments only, enter three or more arguments as "gcd((a, b, c, d))" or "gcd([a, b, c, d])" e.g. a list/tuple)
- sign (returns -1 if negative, 0 if zero, 1 if positive)

**Exponents**

- exp (exponent)
- ln (natural logarithm, base e)
- log (common logarithm, base 10)
- root (2-argument, where root(a, 2) is equivalent to sqrt(a))
- sqrt (square root)

**Trigonometry**

- Basic trigonometric functions: cos, cosh, cot, coth, sin, sinh, tan, tanh
- Trigonometric inverses: acos, acosh, acot, acoth, asin, asinh, atan, atan2 (2-argument arctangent), atanh
- deg (converts radians to degrees)
- rad (converts degrees to radians)

**Complex numbers**

- arg (returns phase in radians of a complex number)
- conjugate
- im (get imaginary part of a number)
- re (get real part of a number)

**Other functions**

- erf (error function)
- binomial

### Allowed constants

Math assignments recognize the following common constants:

- Catalan (Catalan's constant)
- E (note uppercase)
- EulerGamma (Euler-Mascheroni constant)
- GoldenRatio
- I (sqrt(-1) - note uppercase)
- J (sqrt(-1), same as I)
- nan
- oo (infinity)
- pi
- zoo (complex infinity)

## 0 Replies to “Acosh Math Homework”