Next: , Previous: Exit, Up: Reference



Exp

Synopsis

     function Exp (x: Real): Real;

or

     function Exp (z: Complex): Complex;

Description

The exponential function Exp computes the value of e to the power of x, where the Euler number e = Exp (1) is the base of the natural logarithm.

Conforming to

The function Exp is defined in ISO 7185 Pascal; its application to complex values is defined in ISO 10206 Extended Pascal.

Example

     program ExpDemo;
     var
       z: Complex;
     begin
       z := Cmplx (1, - 2 * Pi);  { z = 1 - 2 pi i }
       z := Exp (z);  { yields e = Exp (1), since Exp ix = Cos x + i Sin x }
       WriteLn (Ln (Re (z)) : 0 : 5)  { prints 1 = Ln (Exp (1)) }
     end.

See also

Ln