From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../reference/global_objects/math/expm1/index.html | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 files/pt-br/web/javascript/reference/global_objects/math/expm1/index.html (limited to 'files/pt-br/web/javascript/reference/global_objects/math/expm1/index.html') diff --git a/files/pt-br/web/javascript/reference/global_objects/math/expm1/index.html b/files/pt-br/web/javascript/reference/global_objects/math/expm1/index.html new file mode 100644 index 0000000000..0dfe3aab94 --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/math/expm1/index.html @@ -0,0 +1,80 @@ +--- +title: Math.expm1() +slug: Web/JavaScript/Reference/Global_Objects/Math/expm1 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/expm1 +--- +
{{JSRef}}
+ +

The Math.expm1() function returns ex - 1, where x is the argument, and {{jsxref("Math.E", "e", "", 1)}} the base of the natural logarithms.

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

Syntax

+ +
Math.expm1(x)
+ +

Parameters

+ +
+
x
+
Um número.
+
+ +

Return value

+ +

Um número representando ex - 1, onde e é {{jsxref("Math.E", "Euler's number", "", 1)}} e x ié o argumento.

+ +

Description

+ +

Porque expm1() é um método estático de is Math, você sempre o usurá como Math.expm1(), do que como um método de um objeto Math que você criou (Math não é um contrutor).

+ +

Polyfill

+ +

This can be emulated with the help of the {{jsxref("Math.exp()")}} function:

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

Examples

+ +

Using Math.expm1()

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

Specifications

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

Browser compatibility

+ + + +

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

+ +

See also

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