aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/global_objects/math/sinh/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/javascript/reference/global_objects/math/sinh/index.html')
-rw-r--r--files/fr/web/javascript/reference/global_objects/math/sinh/index.html98
1 files changed, 98 insertions, 0 deletions
diff --git a/files/fr/web/javascript/reference/global_objects/math/sinh/index.html b/files/fr/web/javascript/reference/global_objects/math/sinh/index.html
new file mode 100644
index 0000000000..33c5813d67
--- /dev/null
+++ b/files/fr/web/javascript/reference/global_objects/math/sinh/index.html
@@ -0,0 +1,98 @@
+---
+title: Math.sinh()
+slug: Web/JavaScript/Reference/Objets_globaux/Math/sinh
+tags:
+ - ECMAScript 2015
+ - JavaScript
+ - Math
+ - Méthode
+ - Reference
+ - polyfill
+translation_of: Web/JavaScript/Reference/Global_Objects/Math/sinh
+---
+<div>{{JSRef}}</div>
+
+<p>La fonction <code><strong>Math.sinh()</strong></code> renvoie le sinus hyperbolique d'un nombre, dont la formule, utilisant la constante {{jsxref("Math.E","e")}}, est :</p>
+
+<p><math><semantics><mrow><mstyle mathvariant="monospace"><mo lspace="0em" rspace="thinmathspace">Math.sinh(x)</mo></mstyle><mo>=</mo><mfrac><mrow><msup><mi>e</mi><mi>x</mi></msup><mo>-</mo><msup><mi>e</mi><mrow><mo>-</mo><mi>x</mi></mrow></msup></mrow><mn>2</mn></mfrac></mrow><annotation encoding="TeX">\mathtt{\operatorname{Math.sinh(x)}} = \frac{e^x - e^{-x}}{2}</annotation></semantics></math></p>
+
+<div>{{EmbedInteractiveExample("pages/js/math-sinh.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.sinh(<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>Le sinus hyperbolique de la valeur passée en argument.</p>
+
+<h2 id="Description">Description</h2>
+
+<p><code>sinh()</code> est une méthode statique de <code>Math</code>, il faut utiliser la syntaxe <code>Math.<code>sinh</code>()</code>. Cette méthode ne doit pas être appelée depuis 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.sinh(0) // 0
+Math.sinh(1) // 1.1752011936438014</pre>
+
+<h2 id="Prothèse_d'émulation_(polyfill)">Prothèse d'émulation (<em>polyfill</em>)</h2>
+
+<p>Si cette fonction n'est pas disponible, elle peut être émulée en utilisant la fonction {{jsxref("Math.exp()")}}<code> :</code></p>
+
+<pre class="brush: js language-js">Math.sinh = Math.sinh || function(x){
+ return (Math.exp(x) - Math.exp(-x)) / 2;
+};</pre>
+
+<p>ou encore, si on n'utilise qu'une fois {{jsxref("Math.exp()")}}, avec :</p>
+
+<pre class="brush: js">Math.sinh = Math.sinh || function(x){
+ var y = Math.exp(x);
+ return (y - 1/y) / 2;
+};</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('ES2015', '#sec-math.sinh', 'Math.sinh')}}</td>
+ <td>{{Spec2('ES2015')}}</td>
+ <td>Définition initiale</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-math.sinh', 'Math.sinh')}}</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.sinh")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>{{jsxref("Math.acosh()")}}</li>
+ <li>{{jsxref("Math.asinh()")}}</li>
+ <li>{{jsxref("Math.atanh()")}}</li>
+ <li>{{jsxref("Math.cosh()")}}</li>
+ <li>{{jsxref("Math.tanh()")}}</li>
+</ul>