Sign in Join
FPDoc Onlineexperiment

Ln function

In unit System

Calculate logarithm.

Declaration

pascal
function Ln(d: ValReal): ValReal

Description

Ln returns the natural logarithm of the Real parameter X. X must be positive.

Errors

An run-time error will occur when X is negative.

See also

Example: ex37

pascal
Program Example37;

{ Program to demonstrate the Ln function. }

begin
  Writeln (Ln(1));      { Prints 0 }
  Writeln (Ln(Exp(1))); { Prints 1 }
end.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.