help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'math' (#rtl)

log10

Return 10-Based logarithm.

Declaration

Source position: math.pp line 301

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

ldexp

  

Return (2 to the power p) times x

lnxp1

  

Return natural logarithm of 1+X

log2

  

Return 2-based logarithm

logn

  

Return N-based logarithm.

Example

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505