C# Math Exp

Description

Math Exp returns e raised to the specified power.

Syntax

Math.Exp has the following syntax.


public static double Exp(
  double d
)

Parameters

Math.Exp has the following parameters.

  • d - A number specifying a power.

Returns

Math.Exp method returns The number e raised to the power d. If d equals NaN or PositiveInfinity, that value is returned. If d equals NegativeInfinity, 0 is returned.

Example

The following code shows how to use Math.Exp method.


using System;//from  w  w  w.  j  a  va2s .c  o  m

public class MainClass{
  public static void Main(String[] argv){  

    
    System.Console.WriteLine(Math.Exp(0.5));

  }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version