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 Math.acosh()
statische Methode gibt den inversen hyperbolischen Kosinus einer Zahl zurück. Das bedeutet,
Probieren Sie es aus
console.log(Math.acosh(0.999999999999));
// Expected output: NaN
console.log(Math.acosh(1));
// Expected output: 0
console.log(Math.acosh(2));
// Expected output: 1.3169578969248166
console.log(Math.acosh(2.5));
// Expected output: 1.566799236972411
Syntax
Math.acosh(x)
Parameter
x
-
Eine Zahl, die größer als oder gleich 1 ist.
Rückgabewert
Der inverse hyperbolische Kosinus von x
. Wenn x
kleiner als 1 ist, gibt NaN
zurück.
Beschreibung
Da acosh()
eine statische Methode von Math
ist, wird sie immer als Math.acosh()
genutzt, anstatt als Methode eines selbst erstellten Math
-Objekts (Math
ist kein Konstruktor).
Beispiele
Verwendung von Math.acosh()
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 GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acosh |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support