Die Funktion Math.acosh()
gibt den hyperbolischen Arkuskosinus einer Zahl zurück:
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
Math.acosh(x)
Parameter
x
- Eine Zahl.
Rückgabewert
Der hyperbolische Arkuskosinus der übergebenen Zahl. Wenn die Zahl kleiner als 1 ist, wird NaN
zurückgegeben.
Beschreibung
Weil acosh()
eine statische Methode von Math
ist, muss diese immer mit Math.acosh()
genutzt werden, ohne dass ein Objekt von Math
erstellt wird (Math
ist kein Konstruktor).
Beispiele
Verwendung von Math.acosh()
Math.acosh(-1); // NaN
Math.acosh(0); // NaN
Math.acosh(0.5) // NaN
Math.acosh(1); // 0
Math.acosh(2); // 1.3169578969248166
Für Werte kleiner 1 Math.acosh()
gibt Math.acosh NaN
zurück.
Polyfill
Für gilt: , daher kann dieses mit der folgenden Funktion emuliert werden:
Math.acosh = Math.acosh || function(x) {
return Math.log(x + Math.sqrt(x * x - 1));
};
Spezifikationen
Spezifikation | Status | Kommentar |
---|---|---|
ECMAScript 2015 (6th Edition, ECMA-262) Die Definition von 'Math.acosh' in dieser Spezifikation. |
Standard | Initiale Definition. |
ECMAScript (ECMA-262) Die Definition von 'Math.acosh' in dieser Spezifikation. |
Lebender Standard |
Browserkompatibilität
BCD tables only load in the browser
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.