A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/javascript-math-exp-method/ below:

JavaScript Math exp() Method - GeeksforGeeks

JavaScript Math exp() Method

Last Updated : 15 Jul, 2024

The JavaScript Math exp( ) Method is used to return ex, where x is the argument, and e is Euler's number, which is the base of the natural logarithms. The exp() is a static method of Math, therefore, it is always used as Math.exp(), rather than as a method of a Math object created.

Syntax:  
Math.exp(value)
Parameters:

This function accepts a single parameter as mentioned above and described below:  

Return Value:

Example 1: Below is an example of the Math exp() Method. 

JavaScript
console.log("When zero is passed as a parameter: "
    + Math.exp(0));

Output
When zero is passed as a parameter: 1

Example 2: When "-1" is passed as a parameter.

JavaScript
console.log("Result : " + Math.exp(-1));

Output
Result : 0.36787944117144233

Example 3: When "1" is passed as a parameter. 

JavaScript
console.log("Result : " + Math.exp(1));

Output
Result : 2.718281828459045

We have a complete list of Javascript Math Objects methods, to check those please go through this Javascript Math Object Complete reference article.

Supported Browsers: 

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4