Description |
The Log10 function returns the logarithm to base 10 of Number.
|
|
Related commands |
Exp |
|
Gives the exponent of a number |
Ln |
|
Gives the natural logarithm of a number |
|
|
|
Example code : Show the logarithm of a set of numbers |
// Full Unit code. // ----------------------------------------------------------- // You must store this code in a unit called Unit1 with a form // called Form1 that has an OnCreate event called FormCreate. unit Unit1; interface uses Math, // Unit containing the Log10 command SysUtils, Forms, Dialogs; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} // Include form definitions procedure TForm1.FormCreate(Sender: TObject); 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; end.
|
Hide full unit code |
Log10(1) = 0
Log10(5) = 0.698970004336019
Log10(10) = 1
|
|