uses ..., Math; ... function GetFloatDigitNum(Eps:extended; MinNum:byte=0):byte; var ds:byte; begin Result:=MinNum; if Eps<1 then begin ds:=Round(Abs(Math.Log10(eps))); if ds>MinNum then Result:=ds end; end;