diff options
| author | julieng <julien.gattelier@gmail.com> | 2021-08-03 08:03:23 +0200 |
|---|---|---|
| committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-09-03 08:08:25 +0200 |
| commit | bf8e099b9c8b3c60d60b3712b4fc97b052c39887 (patch) | |
| tree | c101746d082c9581c94f5937519c7d0e2f4af8cb /files/fr/web/javascript/reference/global_objects/math/cbrt | |
| parent | 844f5103992238c0c23203286dad16a466e89c97 (diff) | |
| download | translated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.tar.gz translated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.tar.bz2 translated-content-bf8e099b9c8b3c60d60b3712b4fc97b052c39887.zip | |
convert content to md
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/math/cbrt')
| -rw-r--r-- | files/fr/web/javascript/reference/global_objects/math/cbrt/index.md | 89 |
1 files changed, 35 insertions, 54 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/math/cbrt/index.md b/files/fr/web/javascript/reference/global_objects/math/cbrt/index.md index fb9daa3cc0..8fe0f00c04 100644 --- a/files/fr/web/javascript/reference/global_objects/math/cbrt/index.md +++ b/files/fr/web/javascript/reference/global_objects/math/cbrt/index.md @@ -11,38 +11,37 @@ tags: translation_of: Web/JavaScript/Reference/Global_Objects/Math/cbrt original_slug: Web/JavaScript/Reference/Objets_globaux/Math/cbrt --- -<div>{{JSRef}}</div> +{{JSRef}} -<p>La fonction <code><strong>Math.cbrt()</strong></code> renvoie la racine cubique (le nom anglais étant <em>cubic root</em>) d'un nombre :</p> +La fonction **`Math.cbrt()`** renvoie la racine cubique (le nom anglais étant _cubic root_) d'un nombre : -<p><math><semantics><mrow><mstyle mathvariant="monospace"><mrow><mi>M</mi><mi>a</mi><mi>t</mi><mi>h</mi><mo>.</mo><mi>c</mi><mi>b</mi><mi>r</mi><mi>t</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow></mstyle><mo>=</mo><mroot><mi>x</mi><mn>3</mn></mroot><mo>=</mo><mtext>le seul</mtext><mspace width="thickmathspace"></mspace><mi>y</mi><mspace width="thickmathspace"></mspace><mtext>tel que</mtext><mspace width="thickmathspace"></mspace><msup><mi>y</mi><mn>3</mn></msup><mo>=</mo><mi>x</mi></mrow><annotation encoding="TeX">\mathtt{Math.cbrt(x)} = \sqrt[3]{x} = \text{the unique} \; y \; \text{such that} \; y^3 = x</annotation></semantics></math></p> +<math><semantics><mrow><mstyle mathvariant="monospace"><mrow><mi>M</mi><mi>a</mi><mi>t</mi><mi>h</mi><mo>.</mo><mi>c</mi><mi>b</mi><mi>r</mi><mi>t</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow></mstyle><mo>=</mo><mroot><mi>x</mi><mn>3</mn></mroot><mo>=</mo><mtext>le seul</mtext><mspace width="thickmathspace"></mspace><mi>y</mi><mspace width="thickmathspace"></mspace><mtext>tel que</mtext><mspace width="thickmathspace"></mspace><msup><mi>y</mi><mn>3</mn></msup><mo>=</mo><mi>x</mi></mrow><annotation encoding="TeX">\mathtt{Math.cbrt(x)} = \sqrt[3]{x} = \text{the unique} \; y \; \text{such that} \; y^3 = x</annotation></semantics></math> -<div>{{EmbedInteractiveExample("pages/js/math-cbrt.html")}}</div> +{{EmbedInteractiveExample("pages/js/math-cbrt.html")}} -<h2 id="Syntaxe">Syntaxe</h2> +## Syntaxe -<pre class="syntaxbox">Math.cbrt(<var>x</var>)</pre> + Math.cbrt(x) -<h3 id="Paramètres">Paramètres</h3> +### Paramètres -<dl> - <dt><code>x</code></dt> - <dd>Un nombre.</dd> -</dl> +- `x` + - : Un nombre. -<h3 id="Valeur_de_retour">Valeur de retour</h3> +### Valeur de retour -<p>La racine cubique du nombre passé en argument.</p> +La racine cubique du nombre passé en argument. -<h2 id="Description">Description</h2> +## Description -<p><code>cbrt()</code> étant une méthode statique de <code>Math</code>, il faut utiliser <code>Math.cbrt()</code>, et non pas la méthode d'un autre objet créé (<code>Math</code> n'est pas un constructeur).</p> +`cbrt()` étant une méthode statique de `Math`, il faut utiliser `Math.cbrt()`, et non pas la méthode d'un autre objet créé (`Math` n'est pas un constructeur). -<h2 id="Exemple">Exemple</h2> +## Exemple -<h3 id="Utiliser_Math.cbrt()">Utiliser <code>Math.cbrt()</code></h3> +### Utiliser `Math.cbrt()` -<pre class="brush:js">Math.cbrt(NaN); // NaN +```js +Math.cbrt(NaN); // NaN Math.cbrt(-1); // -1 Math.cbrt(-0); // -0 Math.cbrt(-Infinity); // -Infinity @@ -50,39 +49,21 @@ Math.cbrt(0); // 0 Math.cbrt(1); // 1 Math.cbrt(Infinity); // Infinity Math.cbrt(null); // 0 -Math.cbrt(2); // 1.2599210498948732</pre> - -<h2 id="Spécifications">Spécifications</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Spécification</th> - <th scope="col">État</th> - <th scope="col">Commentaires</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('ES6', '#sec-math.cbrt', 'Math.cbrt')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Définition initiale.</td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-math.cbrt', 'Math.cbrt')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td></td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<p>{{Compat("javascript.builtins.Math.cbrt")}}</p> - -<h2 id="Voir_aussi">Voir aussi</h2> - -<ul> - <li>{{jsxref("Math.pow()")}}</li> - <li>{{jsxref("Math.sqrt()")}}</li> -</ul> +Math.cbrt(2); // 1.2599210498948732 +``` + +## Spécifications + +| Spécification | État | Commentaires | +| ------------------------------------------------------------------------ | ---------------------------- | -------------------- | +| {{SpecName('ES6', '#sec-math.cbrt', 'Math.cbrt')}} | {{Spec2('ES6')}} | Définition initiale. | +| {{SpecName('ESDraft', '#sec-math.cbrt', 'Math.cbrt')}} | {{Spec2('ESDraft')}} | | + +## Compatibilité des navigateurs + +{{Compat("javascript.builtins.Math.cbrt")}} + +## Voir aussi + +- {{jsxref("Math.pow()")}} +- {{jsxref("Math.sqrt()")}} |
