[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh [Back]  [Original]

Math : mthode statique acosh() - JavaScript | MDN

Cette page a t traduite partir de l'anglais par la communaut. Vous pouvez contribuer en rejoignant la communaut francophone sur MDN Web Docs.

View in English Always switch to English

Math : mthode statique acosh()

Baseline Large disponibilit

Cette fonctionnalit est bien tablie et fonctionne sur de nombreux appareils et versions de navigateurs. Elle est disponible sur tous les navigateurs depuis juillet 2015.

La mthode statique Math.acosh() retourne le cosinus hyperbolique inverse d'un nombre. C'est--dire,

x1,.()=arcosh(x)=l'unique y0 tel que cosh(y)=x=ln(x+x21)\begin{aligned}\forall x \geq 1,\;\mathtt{\operatorname{Math.acosh}(x)} &= \operatorname{arcosh}(x) = \text{l'unique } y \geq 0 \text{ tel que } \cosh(y) = x\\&= \ln\left(x + \sqrt{x^2 - 1}\right)\end{aligned}

Dans cet article

Exemple interactif

console.log(Math.acosh(0.999999999999));
// Sortie attendue : NaN

console.log(Math.acosh(1));
// Sortie attendue : 0

console.log(Math.acosh(2));
// Sortie attendue : 1.3169578969248166

console.log(Math.acosh(2.5));
// Sortie attendue : 1.566799236972411

Syntaxe

js
Math.acosh(x)

Paramtres

x

Un nombre suprieur ou gal 1.

Valeur de retour

Le cosinus hyperbolique inverse de x. Si x est infrieur 1, retourne NaN.

Description

Parce que acosh() est une mthode statique de Math, vous l'utilisez toujours comme Math.acosh(), plutt qu'en tant que mthode d'un objet Math que vous auriez cr (Math n'est pas un constructeur).

Exemple

Utiliser la mthode Math.acosh()

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

Spcifications

Spcification
ECMAScript 2027 LanguageSpecification
# sec-math.acosh

Compatibilit des navigateurs

Voir aussi


Web Proxy Viewer  |  New URL  |  Original Page