C# | Math.Exp() Method Last Updated : 01 Feb, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report In C#, Exp() is a Math class method which is used to return the e raised to the specified power. Here e is a mathematical constant whose value is approximately 2.71828. Exp() is the inverse of Log(). Syntax: public static double Exp (double num); Parameter: num: It is the required number of type System.Double which specifies a power. Return Type: It returns a number e raised to the power num of type System.Double. Note: If num is equal to NaN then the return value will be NaN. If num is equal to PositiveInfinity then the return value will be Infinity. If num is equal to NegativeInfinity then the return value will be 0. Example 1: CSharp // C# Program to illustrate the // Math.Exp(Double) Method using System; class Geeks { // Main Method public static void Main() { // using the method Console.WriteLine(Math.Exp(10.0)); Console.WriteLine(Math.Exp(15.57)); Console.WriteLine(Math.Exp(529.548)); Console.WriteLine(Math.Exp(0.00)); } } Output: 22026.4657948067 5780495.71030692 9.54496417945595E+229 1 Example 2: CSharp // C# Program to illustrate the // Math.Exp(Double) Method by // taking NaN, PositiveInfinity // and NegativeInfinity] using System; class Geeks { // Main Method public static void Main() { // Taking NaN Console.WriteLine(Math.Exp(Double.NaN)); // Taking PositiveInfinity Console.WriteLine(Math.Exp(Double.PositiveInfinity)); // Taking NegativeInfinity Console.WriteLine(Math.Exp(Double.NegativeInfinity)); } } Output: NaN Infinity 0 Reference: https://docs.microsoft.com/en-us/dotnet/api/system.math.exp?view=netcore-2.1 Comment More infoAdvertise with us Next Article C# | Math.Exp() Method K Kirti_Mangal Follow Improve Article Tags : Misc C# CSharp-method CSharp-Math Practice Tags : Misc Similar Reads C# | Math.Log() Method In C#, Math.Log() is a Math class method. It is used to return the logarithm of a specified number. This method can be overloaded by changing the number of the arguments passed. There are total 2 methods in the overload list of the Math.Log() method as follows: Math.Log(Double) Method Math.Log(Doubl 4 min read C# | Math.Log10() Method In C#, Math.Log10() is a Math class method. It is used to return the base 10 logarithm of a specified number. Syntax: public static double Log10(double val) Parameter: val: It is the specified number whose logarithm to be calculated and its type is System.Double. Return Value: It returns the logarit 2 min read C# | Math.Pow() Method In C#, Math.Pow() is a Math class method. This method is used to calculate a number raise to the power of some other number. Syntax: public static double Pow(double base, double power) Parameters: double base: It is a double-precision floating-point number which is to be raised to a power and type o 2 min read JavaScript Math exp() Method 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(v 2 min read JavaScript Math expm1() Method Math.expm1() is an inbuilt method in JavaScript that is used to get the value of ep-1, where p is any given number. The number e is a mathematical constant having an approximate value equal to 2.718. It was discovered by the Swiss mathematician Jacob Bernoulli. This number is also called Euler's num 3 min read Like