A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Math/sinh below:

Math.sinh() - JavaScript | MDN

Math.sinh()

Baseline Widely available

La fonction Math.sinh() renvoie le sinus hyperbolique d'un nombre, dont la formule, utilisant la constante e, est :

Math.sinh(x) = ex - e - x 2 \mathtt{\operatorname{Math.sinh(x)}} = \frac{e^x - e^{-x}}{2}

Exemple interactif
console.log(Math.sinh(0));
// Expected output: 0

console.log(Math.sinh(1));
// Expected output: 1.1752011936438014

console.log(Math.sinh(-1));
// Expected output: -1.1752011936438014

console.log(Math.sinh(2));
// Expected output: 3.626860407847019
Syntaxe Paramètres Valeur de retour

Le sinus hyperbolique de la valeur passée en argument.

Description

sinh() est une méthode statique de Math, il faut utiliser la syntaxe Math.sinh(). Cette méthode ne doit pas être appelée depuis un autre objet qui aurait été créé (Math n'est pas un constructeur).

Exemples
Math.sinh(0); // 0
Math.sinh(1); // 1.1752011936438014
Prothèse d'émulation (polyfill)

Si cette fonction n'est pas disponible, elle peut être émulée en utilisant la fonction Math.exp() :

Math.sinh =
  Math.sinh ||
  function (x) {
    return (Math.exp(x) - Math.exp(-x)) / 2;
  };

ou encore, si on n'utilise qu'une fois Math.exp(), avec :

Math.sinh =
  Math.sinh ||
  function (x) {
    var y = Math.exp(x);
    return (y - 1 / y) / 2;
  };
Spécifications Compatibilité des navigateurs Voir aussi

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4