Вычисление логарифма

Previous  Top  Next

    
 

 

Code:

{

 

  --- English ------

  A logarithm function with a variable basis

 

}

function Log(x, b: Real): Real;

begin

  Result := ln(x) / ln(b);

end;

 

procedure TForm1.Button1Click(Sender: TObject);

begin

  ShowMessage(Format('%f', [Log(10, 10)]));

end;

 

©Drkb::04096

Взято с сайта: http://www.swissdelphicenter.ch