From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- .../reference/global_objects/math/acosh/index.html | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 files/fr/web/javascript/reference/global_objects/math/acosh/index.html (limited to 'files/fr/web/javascript/reference/global_objects/math/acosh/index.html') diff --git a/files/fr/web/javascript/reference/global_objects/math/acosh/index.html b/files/fr/web/javascript/reference/global_objects/math/acosh/index.html new file mode 100644 index 0000000000..3598039002 --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/math/acosh/index.html @@ -0,0 +1,100 @@ +--- +title: Math.acosh() +slug: Web/JavaScript/Reference/Objets_globaux/Math/acosh +tags: + - JavaScript + - Math + - Méthode + - Reference + - polyfill +translation_of: Web/JavaScript/Reference/Global_Objects/Math/acosh +--- +
{{JSRef}}
+ +

La fonction Math.acosh() renvoie l'arc cosinus hyperbolique d'un nombre.Elle est définie par :

+ +

x1,Math.acosh(x)=arcosh(x)= l'unique y0tel quecosh(y)=x\forall x \geq 1, \mathtt{\operatorname{Math.acosh}(x)} = \operatorname{arcosh}(x) = \text{ the unique } \; y \geq 0 \; \text{such that} \; \cosh(y) = x

+ +
{{EmbedInteractiveExample("pages/js/math-acosh.html")}}
+ + + +

Syntaxe

+ +
Math.acosh(x)
+ +

Paramètres

+ +
+
x
+
Un nombre.
+
+ +

Valeur de retour

+ +

L'arc cosinus hyperbolique du nombre en argument. Si le nombre est inférieur à 1, la valeur renvoyée sera {{jsxref("NaN")}}.

+ +

Description

+ +

acosh étant une méthode statique de Math, il faut l'utiliser avec Math.acosh(), plutôt qu'en faisant appel à une méthode d'un autre objet créé (Math n'est pas un constructeur).

+ +

Exemple

+ +

Utiliser Math.acosh()

+ +
Math.acosh(-1);  // NaN
+Math.acosh(0);   // NaN
+Math.acosh(0.5); // NaN
+Math.acosh(1);   // 0
+Math.acosh(2);   // 1.3169578969248166
+ +

Pour les valeurs strictement inférieures à 1 Math.acosh renvoie {{jsxref("NaN")}}.

+ +

Prothèse d'émulation (polyfill)

+ +

Pour tout x1x \geq 1, arcosh(x)=ln(x+x2-1)\operatorname {arcosh} (x) = \ln \left(x + \sqrt{x^{2} - 1} \right), on peut donc émuler cette fonction avec le code suivant :

+ +
function acosh(x) {
+  return Math.log(x + Math.sqrt(x * x - 1));
+}
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('ES6', '#sec-math.acosh', 'Math.acosh')}}{{Spec2('ES6')}}Définition initiale
{{SpecName('ESDraft', '#sec-math.acosh', 'Math.acosh')}}{{Spec2('ESDraft')}} 
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("javascript.builtins.Math.acosh")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf