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/expm1/index.html | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 files/fr/web/javascript/reference/global_objects/math/expm1/index.html (limited to 'files/fr/web/javascript/reference/global_objects/math/expm1') diff --git a/files/fr/web/javascript/reference/global_objects/math/expm1/index.html b/files/fr/web/javascript/reference/global_objects/math/expm1/index.html new file mode 100644 index 0000000000..daff456379 --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/math/expm1/index.html @@ -0,0 +1,94 @@ +--- +title: Math.expm1() +slug: Web/JavaScript/Reference/Objets_globaux/Math/expm1 +tags: + - ECMAScript6 + - JavaScript + - Math + - Méthode + - Reference + - polyfill +translation_of: Web/JavaScript/Reference/Global_Objects/Math/expm1 +--- +
{{JSRef}}
+ +

La fonction Math.expm1() renvoie ex - 1, avec x l'argument donné et {{jsxref("Objets_globaux/Math/E","e")}} la base du logarithme nepérien.

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

Syntaxe

+ +
Math.expm1(x)
+ +

Paramètres

+ +
+
x
+
Un nombre.
+
+ +

Valeur de retour

+ +

Un nombre qui représente ex- 1x est la valeur passée en argument et ex l'exponentielle du nombre.

+ +

Description

+ +

expm1() étant une méthode statique de Math, il faut utiliser Math.expm1()et non pas la méthode d'un autre objet qui aurait été créé sur mesure (Math n'est pas un constructeur).

+ +

Exemple

+ +

Utiliser Math.expm1()

+ +
Math.expm1(-1); // -0.6321205588285577
+Math.expm1(0);  // 0
+Math.expm1(1);  // 1.718281828459045
+ +

Prothèse d'émulation (polyfill)

+ +

Cette fonction peut être émulée en utilisant la fonction {{jsxref("Objets_globaux/Math/exp", "Math.exp()")}} :

+ +
Math.expm1 = Math.expm1 || function(x) {
+    return Math.exp(x) - 1;
+};
+ +

Spécifications

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

Compatibilité des navigateurs

+ + + +

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

+ +

Voir aussi

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