diff options
| author | Florian Merz <me@fiji-flo.de> | 2021-02-11 12:36:08 +0100 |
|---|---|---|
| committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 12:36:08 +0100 |
| commit | 39f2114f9797eb51994966c6bb8ff1814c9a4da8 (patch) | |
| tree | 66dbd9c921f56e440f8816ed29ac23682a1ac4ef /files/fr/web/javascript/reference/objets_globaux/math/sqrt/index.html | |
| parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
| download | translated-content-39f2114f9797eb51994966c6bb8ff1814c9a4da8.tar.gz translated-content-39f2114f9797eb51994966c6bb8ff1814c9a4da8.tar.bz2 translated-content-39f2114f9797eb51994966c6bb8ff1814c9a4da8.zip | |
unslug fr: move
Diffstat (limited to 'files/fr/web/javascript/reference/objets_globaux/math/sqrt/index.html')
| -rw-r--r-- | files/fr/web/javascript/reference/objets_globaux/math/sqrt/index.html | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/files/fr/web/javascript/reference/objets_globaux/math/sqrt/index.html b/files/fr/web/javascript/reference/objets_globaux/math/sqrt/index.html deleted file mode 100644 index 1a95e53caa..0000000000 --- a/files/fr/web/javascript/reference/objets_globaux/math/sqrt/index.html +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Math.sqrt() -slug: Web/JavaScript/Reference/Objets_globaux/Math/sqrt -tags: - - JavaScript - - Math - - Méthode - - Reference -translation_of: Web/JavaScript/Reference/Global_Objects/Math/sqrt ---- -<div>{{JSRef}}</div> - -<p>La fonction <code><strong>Math.sqrt()</strong></code> renvoie la racine carrée d'un nombre. Cette fonction est définie par :</p> - -<p><math display="block"><semantics><mrow><mo>∀</mo><mi>x</mi><mo>≥</mo><mn>0</mn><mo>,</mo><mstyle mathvariant="monospace"><mrow><mi>M</mi><mi>a</mi><mi>t</mi><mi>h</mi><mo>.</mo><mi>s</mi><mi>q</mi><mi>r</mi><mi>t</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow></mstyle><mo>=</mo><msqrt><mi>x</mi></msqrt><mo>=</mo><mtext>l'unique</mtext><mspace width="thickmathspace"></mspace><mi>y</mi><mo>≥</mo><mn>0</mn><mspace width="thickmathspace"></mspace><mtext>tel que</mtext><mspace width="thickmathspace"></mspace><msup><mi>y</mi><mn>2</mn></msup><mo>=</mo><mi>x</mi></mrow><annotation encoding="TeX">\forall x \geq 0, \mathtt{Math.sqrt(x)} = \sqrt{x} = \text{the unique} \; y \geq 0 \; \text{such that} \; y^2 = x</annotation></semantics></math></p> - -<div>{{EmbedInteractiveExample("pages/js/math-sqrt.html")}}</div> - -<p class="hidden">Le code source de cet exemple interactif est disponible dans un dépôt GitHub. Si vous souhaitez contribuez à ces exemples, n'hésitez pas à cloner <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> et à envoyer une <em>pull request</em> !</p> - -<h2 id="Syntaxe">Syntaxe</h2> - -<pre class="syntaxbox">Math.sqrt(<var>x</var>)</pre> - -<h3 id="Paramètres">Paramètres</h3> - -<dl> - <dt><code>x</code></dt> - <dd>Un nombre.</dd> -</dl> - -<h3 id="Valeur_de_retour">Valeur de retour</h3> - -<p>La racine carrée du nombre passé en argument. Si le nombre fourni est négatif, c'est {{jsxref("NaN")}} qui sera renvoyé.</p> - -<h2 id="Description">Description</h2> - -<p>Si la valeur de <code>x</code> est négative, <code>sqrt</code> renverra {{jsxref("NaN")}}.</p> - -<p><code>sqrt()</code> est une méthode statique de <code>Math</code>, elle doit être utilisée avec la syntaxe <code>Math.sqrt()</code>, elle ne doit pas être appelée comme méthode d'un autre objet qui aurait été créé (<code>Math</code> n'est pas un constructeur).</p> - -<h2 id="Exemples">Exemples</h2> - -<pre class="brush:js">Math.sqrt(9); // 3 -Math.sqrt(2); // 1.414213562373095 - -Math.sqrt(1); // 1 -Math.sqrt(0); // 0 -Math.sqrt(-1); // NaN -Math.sqrt(-0); // -0</pre> - -<h2 id="Spécifications">Spécifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Spécification</th> - <th scope="col">État</th> - <th scope="col">Commentaires</th> - </tr> - <tr> - <td>{{SpecName('ES1')}}</td> - <td>{{Spec2('ES1')}}</td> - <td>Définition initiale. Implémentée avec JavaScript 1.0.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.8.2.17', 'Math.sqrt')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-math.sqrt', 'Math.sqrt')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-math.sqrt', 'Math.sqrt')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<p class="hidden">Le tableau de compatibilité de cette page a été généré à partir de données structurées. Si vous souhaitez contribuer à ces données, n'hésitez pas à envoyer une <em>pull request</em> sur <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>.</p> - -<p>{{Compat("javascript.builtins.Math.sqrt")}}</p> - -<h2 id="Voir_aussi">Voir aussi</h2> - -<ul> - <li>{{jsxref("Math.cbrt()")}}</li> - <li>{{jsxref("Math.exp()")}}</li> - <li>{{jsxref("Math.log()")}}</li> - <li>{{jsxref("Math.pow()")}}</li> -</ul> |
