Math.acosh()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Die statische Methode Math.acosh() gibt den inversen hyperbolischen Kosinus einer Zahl zurück. Das heißt,

x1,𝙼𝚊𝚝𝚑.𝚊𝚌𝚘𝚜𝚑(𝚡)=arcosh(x)=the unique y0 such that cosh(y)=x=ln(x+x21)\begin{aligned}\forall x \geq 1,\;\mathtt{\operatorname{Math.acosh}(x)}} &= \operatorname{arcosh}(x) = \text{the unique } y \geq 0 \text{ such that } \cosh(y) = x\\&= \ln\left(x + \sqrt{x^2 - 1}\right)\end{aligned}

Probieren Sie es aus

Syntax

js
Math.acosh(x)

Parameter

x

Eine Zahl größer oder gleich 1.

Rückgabewert

Der inverse hyperbolische Kosinus von x. Wenn x kleiner als 1 ist, wird NaN zurückgegeben.

Beschreibung

Da acosh() eine statische Methode von Math ist, wird sie immer als Math.acosh() verwendet, nicht als Methode eines erstellten Math-Objekts (Math ist kein Konstruktor).

Beispiele

Verwendung von Math.acosh()

js
Math.acosh(0); // NaN
Math.acosh(1); // 0
Math.acosh(2); // 1.3169578969248166
Math.acosh(Infinity); // Infinity

Spezifikationen

Specification
ECMAScript® 2025 Language Specification
# sec-math.acosh

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
acosh

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Siehe auch