|
The Log10() function calculates the base 10
logarithm of a number. The syntax of this function is:
Extended __fastcall Log10(Extended X);
|
The number to be evaluated is passed as the argument
X. The function returns the logarithm on base 10 using the formula:
y = log10x
which is equivalent to
x = 10y
Here is an example:
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Extended X, Result;
X = StrToFloat(Edit1->Text);
Result = Log10(X);
Edit2->Text = FloatToStr(Result);
}
//---------------------------------------------------------------------------