DelphiBasics
Log10
Function
Gives the log to base 10 of a number Math unit
 function Log10(const Number Extended):Extended;
Description
The Log10 function returns the logarithm to base 10 of Number.
Related commands
ExpGives the exponent of a number
LnGives the natural logarithm of a number
 Download this web site as a Windows program.




 
Example code : Show the logarithm of a set of numbers
begin
  // Show the Log to base 10 values of 3 numbers
  ShowMessage('Log10(1)  = '+FloatToStr(Log10(1)));
  ShowMessage('Log10(5)  = '+FloatToStr(Log10(5)));
  ShowMessage('Log10(10) = '+FloatToStr(Log10(10)));
end;
Show full unit code
  Log10(1) = 0
  Log10(5) = 0.698970004336019
  Log10(10) = 1
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page