Die Math.exp()
Funktion gibt ex
zurück, wobei x
der Parameter ist. e
ist die Eulersche Zahl, die Basis des natürlichen Logarithmus.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Syntax
Math.exp(x)
Parameter
x
- Eine Zahl.
Rückgabewert
Die Zahl, die ex
repräsentiert, wobei e
die Eulersche Zahl ist und x
die übergebene Zahl ist.
Beschreibung
Weil exp()
eine statische Funktion von Math
ist, wird es immer als Math.
exp
()
eingesetzt,
jedoch nicht als Methode eines erzeugten Math
Objektes (Math
ist kein Konstruktor).
Beispiele
Einsatz von Math.exp()
Math.exp(-1); // 0.36787944117144233
Math.exp(0); // 1
Math.exp(1); // 2.718281828459045
Spezifikationen
Spezifikation | Status | Comment |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Standard | Initiale Definition. Implementiert in JavaScript 1.0. |
ECMAScript 5.1 (ECMA-262) Die Definition von 'Math.exp' in dieser Spezifikation. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) Die Definition von 'Math.exp' in dieser Spezifikation. |
Standard | |
ECMAScript (ECMA-262) Die Definition von 'Math.exp' in dieser Spezifikation. |
Lebender Standard |
Browserkompatibilität
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.