From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- .../objectes_globals/math/sinh/index.html | 129 +++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 files/ca/web/javascript/referencia/objectes_globals/math/sinh/index.html (limited to 'files/ca/web/javascript/referencia/objectes_globals/math/sinh') diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/sinh/index.html b/files/ca/web/javascript/referencia/objectes_globals/math/sinh/index.html new file mode 100644 index 0000000000..a1cc1f446a --- /dev/null +++ b/files/ca/web/javascript/referencia/objectes_globals/math/sinh/index.html @@ -0,0 +1,129 @@ +--- +title: Math.sinh() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/sinh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/sinh +--- +
{{JSRef}}
+ +

La funció Math.sinh() retorna el sinus hiperbòlic d'un nombre, que es pot expressar utilitzant la {{jsxref("Math.E", "constant e", "", 1)}}:

+ +

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

+ +

Sintaxi

+ +
Math.sinh(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que que sinh() és un mètode estàtic de Math, sempre s'utilitza com a Math.sinh(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.sinh()

+ +
Math.sinh(0); // 0
+Math.sinh(1); // 1.1752011936438014
+
+ +

Polyfill

+ +

Aquest comportament es pot emular amb l'ajut de la funció {{jsxref("Math.exp()")}}:

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

O bé utilitzant només una crida a la funció {{jsxref("Math.exp()")}}:

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

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.sinh', 'Math.sinh')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

+ + -- cgit v1.2.3-54-g00ecf