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/expm1/index.html | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 files/ca/web/javascript/referencia/objectes_globals/math/expm1/index.html (limited to 'files/ca/web/javascript/referencia/objectes_globals/math/expm1/index.html') diff --git a/files/ca/web/javascript/referencia/objectes_globals/math/expm1/index.html b/files/ca/web/javascript/referencia/objectes_globals/math/expm1/index.html new file mode 100644 index 0000000000..b8055fba45 --- /dev/null +++ b/files/ca/web/javascript/referencia/objectes_globals/math/expm1/index.html @@ -0,0 +1,122 @@ +--- +title: Math.expm1() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/expm1 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/expm1 +--- +
{{JSRef}}
+ +

La funció Math.expm1() retorna ex - 1, on x és l'argument i {{jsxref("Math.E", "e", "", 1)}} és la base dels logaritmes naturals.

+ +

Sintaxi

+ +
Math.expm1(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que expm1() és un mètode estàtic de Math, sempre s'utilitza com Math.expm1() en comptes de com un mètode d'un objecte Math creat (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.expm1()

+ +
Math.expm1(-1); // -0.6321205588285577
+Math.expm1(0);  // 0
+Math.expm1(1);  // 1.718281828459045
+
+ +

Polyfill

+ +

Aquesta funció pot ser emulada amb l'ajuda de la funció {{jsxref("Math.exp()")}}:

+ +
Math.expm1 = Math.expm1 || function(x) {
+  return Math.exp(x) - 1;
+};
+
+ +

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.expm1', 'Math.expm1')}}{{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