Hi!
Beg you pardon if this was asked Q&A'd before, but I didn't find any by searching this site.
I wrote a little program for testing reasons before I dive deeper into programing with FPC
...
var number: real/single/double/extended; (tried them all successively)
...
readln (number);
writeln (number/2); (I even tried it with 2.0);
Some input give me correct results, like
2.5 -> 1.25000...000E+000
2.6 -> 1.3000...000E+000
Others fail, like
2.7 -> 1.35000...0001E+000
6.6 -> 3.2999...9998E+000
How come? Why that?
To prevent this, what switches or options do I need?
Thanks in advance