Math.asinh()
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.
La fonction Math.asinh()
renvoie l'arc sinus hyperbolique d'un nombre :
Exemple interactif
console.log(Math.asinh(1));
// Expected output: 0.881373587019543
console.log(Math.asinh(0));
// Expected output: 0
console.log(Math.asinh(-1));
// Expected output: -0.881373587019543
console.log(Math.asinh(2));
// Expected output: 1.4436354751788103
Syntaxe
Math.asinh(x);
Paramètres
x
-
Un nombre.
Valeur de retour
L'arc sinus hyperbolique du nombre passé en argument.
Description
asinh()
étant une méthode statique de Math
, elle doit toujours être utilisée avec la syntaxe Math.asinh()
et ne doit pas être appelée depuis un autre objet qui aurait été créé (Math n'est pas un constructeur).
Exemple
Utiliser Math.asinh()
Math.asinh =
Math.asinh ||
function (x) {
if (x === -Infinity) {
return x;
} else {
return Math.log(x + Math.sqrt(x * x + 1));
}
};
Spécifications
Specification |
---|
ECMAScript® 2025 Language Specification # sec-math.asinh |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asinh |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support