From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- .../objetos_globales/math/expm1/index.html | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 files/es/web/javascript/referencia/objetos_globales/math/expm1/index.html (limited to 'files/es/web/javascript/referencia/objetos_globales/math/expm1') diff --git a/files/es/web/javascript/referencia/objetos_globales/math/expm1/index.html b/files/es/web/javascript/referencia/objetos_globales/math/expm1/index.html new file mode 100644 index 0000000000..d8679d9230 --- /dev/null +++ b/files/es/web/javascript/referencia/objetos_globales/math/expm1/index.html @@ -0,0 +1,89 @@ +--- +title: Math.expm1() +slug: Web/JavaScript/Referencia/Objetos_globales/Math/expm1 +tags: + - JavaScript + - Matemáticas + - Math + - Method + - Referencia + - metodo +translation_of: Web/JavaScript/Reference/Global_Objects/Math/expm1 +--- +
{{JSRef}}
+ +

La función Math.expm1() regresa ex - 1, donde x es el argumento, y {{jsxref("Math.E", "e", "", 1)}} la base del logaritmo natural.

+ +
{{EmbedInteractiveExample("pages/js/math-expm1.html")}}
+ + + +

Sintaxis

+ +
Math.expm1(x)
+ +

Parámetos

+ +
+
x
+
Un número.
+
+ +

Valor de retorno

+ +

Un número representando ex - 1, donde e es {{jsxref("Math.E", "Número de Euler", "", 1)}} y  x es el argumento.

+ +

Descripción

+ +

Debido a que expm1() es un método estático de Math, uselo siempre como Math.expm1(), en lugar de como un método del objeto Math que creó (Math no es un constructor).

+ +

Ejemplos

+ +

Usando Math.expm1()

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

Polyfill

+ +

Esto puede ser emulado con la ayuda de la función {{jsxref("Math.exp()")}}:

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

Especificaciones

+ + + + + + + + + + + + +
Especificación
{{SpecName('ESDraft', '#sec-math.expm1', 'Math.expm1')}}
+ +

Compatibilidad de navegadores

+ + + +

{{Compat("javascript.builtins.Math.expm1")}}

+ +

Vea también

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