In Delphi when I try to do this:
tmp := Frac(Frac(135.45)*100);
I see that it returns 1, when I expected 0. Why? tmp
in this case is a Real
variable.
Also, I used the below code to receive a visual confirmation:
Dialogs.ShowMessage(Format('Frac1=%f Frac2=%f', [Frac(Frac(135.45)*100), Frac(45)]));
What is wrong? Is it a Delphi bug?