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 Juli 2015.
Die Math.acosh() statische Methode gibt den inversen hyperbolischen Kosinus einer Zahl zurück. Das heißt,
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
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 und nicht als Methode eines selbst 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® 2026 Language Specification> # sec-math.acosh> |