Math.sinh()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

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

Math.sinh(x)=ex-e-x2\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

js
Math.sinh(x);

Paramètres

x

Un nombre.

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

js
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() :

js
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 :

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

Spécifications

Specification
ECMAScript® 2025 Language Specification
# sec-math.sinh

Compatibilité des navigateurs

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
sinh

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Voir aussi