Sign in Join
FPDoc Onlineexperiment

Log10 function

In unit Math

Return 10-Based logarithm.

Declaration

pascal
function Log10(x: Float): Float

Description

Log10 returns the 10-base logarithm of X.

Errors

If x is less than or equal to 0 an 'invalid fpu operation' error will occur.

See also

Example: ex21

pascal
Program Example21;

{ Program to demonstrate the log10 function. }

Uses math;

begin
  Writeln(Log10(10):8:4);
  Writeln(Log10(100):8:4);
  Writeln(Log10(1000):8:4);
  Writeln(Log10(1):8:4);
  Writeln(Log10(0.1):8:4);
  Writeln(Log10(0.01):8:4);
  Writeln(Log10(0.001):8:4);
end.

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