I need to know how many digits has float number after point.
Delphi-Quellcode:
function CountDigitsAfterPoint(AValue: Extended): Byte;
begin
Result := 0;
while (Frac(AValue) <> 0) do
begin
Inc(Result);
AValue := AValue * 10;
end;
end;
Working good in most cases, but not for all
Incorect results for sample data:
2.048 --> 19
8.448 --> 19
565.148 --> 17
32.064 --> 18
274.176 --> 17
97.728 --> 17
155.52 --> 17
622.08 --> 17
Please help