From bf8e099b9c8b3c60d60b3712b4fc97b052c39887 Mon Sep 17 00:00:00 2001 From: julieng Date: Tue, 3 Aug 2021 08:03:23 +0200 Subject: convert content to md --- .../reference/global_objects/math/expm1/index.md | 105 +++++++++------------ 1 file changed, 45 insertions(+), 60 deletions(-) (limited to 'files/fr/web/javascript/reference/global_objects/math/expm1') diff --git a/files/fr/web/javascript/reference/global_objects/math/expm1/index.md b/files/fr/web/javascript/reference/global_objects/math/expm1/index.md index 372880a5df..2d8223041f 100644 --- a/files/fr/web/javascript/reference/global_objects/math/expm1/index.md +++ b/files/fr/web/javascript/reference/global_objects/math/expm1/index.md @@ -11,81 +11,66 @@ tags: translation_of: Web/JavaScript/Reference/Global_Objects/Math/expm1 original_slug: Web/JavaScript/Reference/Objets_globaux/Math/expm1 --- -
{{JSRef}}
+{{JSRef}} -

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

+La fonction **`Math.expm1()`** renvoie` e^x` - 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")}}
+{{EmbedInteractiveExample("pages/js/math-expm1.html")}} -

Syntaxe

+## Syntaxe -
Math.expm1(x)
+ Math.expm1(x) -

Paramètres

+### Paramètres -
-
x
-
Un nombre.
-
+- `x` + - : Un nombre. -

Valeur de retour

+### Valeur de retour -

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

+Un nombre qui représente `e^x- 1` où `x` est la valeur passée en argument et `e^x` l'exponentielle du nombre. -

Description

+## 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).

+`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

+## Exemple -

Utiliser Math.expm1()

+### Utiliser `Math.expm1()` -
Math.expm1(-1); // -0.6321205588285577
+```js
+Math.expm1(-1); // -0.6321205588285577
 Math.expm1(0);  // 0
-Math.expm1(1);  // 1.718281828459045
+Math.expm1(1); // 1.718281828459045 +``` -

Prothèse d'émulation (polyfill)

+## Prothèse d'émulation (_polyfill_) -

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

+Cette fonction peut être émulée en utilisant la fonction {{jsxref("Objets_globaux/Math/exp", "Math.exp()")}} : -
Math.expm1 = Math.expm1 || function(x) {
+```js
+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

- - +}; +``` + +## Spécifications + +| Spécification | État | Commentaires | +| ---------------------------------------------------------------------------- | ---------------------------- | -------------------- | +| {{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 + +- {{jsxref("Math.E")}} +- {{jsxref("Math.exp()")}} +- {{jsxref("Math.log()")}} +- {{jsxref("Math.log10()")}} +- {{jsxref("Math.log1p()")}} +- {{jsxref("Math.log2()")}} +- {{jsxref("Math.pow()")}} -- cgit v1.2.3-54-g00ecf