unit SystemExp;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: SystemExp
// Routine: System.Exp
// Routine: System.Ln

// BeginCode
{
This example calculated the exponential of 1.0 and then calculates
the natural log of that quantity to show that the natural log
function is the inverse of the exponential function.
}
procedure TForm1.Button1Click(Sender: TObject);
var
   e : real;
   S : string;
begin
   e := Exp(1.0);
   Str(ln(e):3:2, S);
   S := 'e = ' + FloatToStr(e) + '; ln(e) = ' + S;
   Canvas.TextOut(10, 10, S);
end;
// EndCode
// EndExample: SystemExp
end.
