ESBLogBase Function
Returns Logarithm of X to Given Base.

Unit
QESBPCSMath

Declaration
Function ESBLogBase(const X, Base: Extended): Extended;

Parameters
Value to process.
Base Logarithm Base to use.

Category
Arithmetic Routines for Floats

Implementation

function ESBLogBase (const X, Base: Extended): Extended;
begin
     if not FloatIsPositive (X) then // must be Positive
          raise EMathError.Create (rsValueGZero)
     else if not FloatIsPositive (Base) then // must be Positive
          raise EMathError.Create (rsValueGZero)
     else
          Result := ESBLog2 (X) / ESBLog2 (Base);
End;


HTML generated by Time2HELP
http://www.time2help.com