Hızlı yanıt: kod örneği
Formatting functions don't always display the actual numbers (data).
Real numbers and precision can be tricky.Check out this code where I use more precision on what I want to see on the screen:It appears that is something like while is like .Edit: type has better precision than type.
If we try to display the values of D and E with FloatToString() we'll probably get the same result, even though the actual values are not the same.
D := Frac(101 / 100); E := Frac(101 / 100); ShowMessage(FloatToStrF(D, ffFixed, 15, 20)); ShowMessage(FloatToStrF(E, ffFixed, 18, 20));
D
0.010000000000
E
0.00999999999
Extended
Double