diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
| commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
| tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/javascript/reference/global_objects/math/expm1 | |
| parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
| download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip | |
initial commit
Diffstat (limited to 'files/pt-br/web/javascript/reference/global_objects/math/expm1')
| -rw-r--r-- | files/pt-br/web/javascript/reference/global_objects/math/expm1/index.html | 80 |
1 files changed, 80 insertions, 0 deletions
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 +--- +<div>{{JSRef}}</div> + +<p>The <strong><code>Math.expm1()</code></strong> function returns <code>e<sup>x</sup> - 1</code>, where <code>x</code> is the argument, and {{jsxref("Math.E", "e", "", 1)}} the base of the natural logarithms.</p> + +<div>{{EmbedInteractiveExample("pages/js/math-expm1.html")}}</div> + + + +<h2 id="Syntax">Syntax</h2> + +<pre class="syntaxbox notranslate"><code>Math.expm1(<var>x</var>)</code></pre> + +<h3 id="Parameters">Parameters</h3> + +<dl> + <dt><code>x</code></dt> + <dd>Um número.</dd> +</dl> + +<h3 id="Return_value">Return value</h3> + +<p>Um número representando <code>e<sup>x</sup> - 1</code>, onde <code>e</code> é {{jsxref("Math.E", "Euler's number", "", 1)}} e <code>x</code> ié o argumento.</p> + +<h2 id="Description">Description</h2> + +<p>Porque <code>expm1()</code> é um método estático de is <code>Math</code>, você sempre o usurá como <code>Math.expm1()</code>, do que como um método de um objeto <code>Math</code> que você criou (<code>Math</code> não é um contrutor).</p> + +<h2 id="Polyfill">Polyfill</h2> + +<p>This can be emulated with the help of the {{jsxref("Math.exp()")}} function:</p> + +<pre class="brush: js notranslate">Math.expm1 = Math.expm1 || function(x) { + return Math.exp(x) - 1; +}; +</pre> + +<h2 id="Examples">Examples</h2> + +<h3 id="Using_Math.expm1">Using <code>Math.expm1()</code></h3> + +<pre class="brush: js notranslate">Math.expm1(-1); // -0.6321205588285577 +Math.expm1(0); // 0 +Math.expm1(1); // 1.718281828459045 +</pre> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + </tr> + <tr> + <td>{{SpecName('ESDraft', '#sec-math.expm1', 'Math.expm1')}}</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("javascript.builtins.Math.expm1")}}</p> + +<h2 id="See_also">See also</h2> + +<ul> + <li>{{jsxref("Math.E")}}</li> + <li>{{jsxref("Math.exp()")}}</li> + <li>{{jsxref("Math.log()")}}</li> + <li>{{jsxref("Math.log10()")}}</li> + <li>{{jsxref("Math.log1p()")}}</li> + <li>{{jsxref("Math.log2()")}}</li> + <li>{{jsxref("Math.pow()")}}</li> +</ul> |
