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



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

logn

Return N-based logarithm.

Declaration

Source position: math.pp line 303

function logn(

  n: float;

  x: float

):float;

Description

Logn returns the n-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

log10

  

Return 10-Based logarithm.

log2

  

Return 2-based logarithm

Example

Program Example23;

{ Program to demonstrate the logn function. }

Uses math;

begin
  Writeln(Logn(3,4):8:4);
  Writeln(Logn(2,4):8:4);
  Writeln(Logn(6,9):8:4);
  Writeln(Logn(exp(1),exp(1)):8:4);
  Writeln(Logn(0.5,1):8:4);
  Writeln(Logn(0.25,3):8:4);
  Writeln(Logn(0.125,5):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