Home  |  Delphi .net Home  |  System.Math  |  Exp Method
Exp  
Method  
Returns E raised to the given power
Math Class
System NameSpace
CF1.  Function Exp ( Power : Double; ) : Double; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
Gives the exponential of Power, being E raised to that power.
 
= 2.71828182845905
Notes
Static methods are not methods of an object - they are simply class functions or procedures available at any time.
Microsoft MSDN Links
System
System.Math
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  float : Double;
begin
  // E raised to the Power of 1.0 = E
  float := System.Math.Exp(1.0);
  Console.WriteLine('Exp(1.0)  = {0}', float.ToString);
  Console.WriteLine('E         = {0}', float.ToString);

  // E raised to the Power of 2.0
  float := System.Math.Exp(2.0);
  Console.WriteLine('Exp(2.0)  = {0}', float.ToString);

  Console.ReadLine;
end.
Show full unit code
  Exp(1.0)  = 2.71828182845905
  E         = 2.71828182845905
  Exp(2.0)  = 7.38905609893065
 
 
Delphi Programming © Neil Moffatt All rights reserved.  |  Contact the author