Mail Archives: djgpp/1998/04/06/05:46:33
A simple (in this newbie's HO) thing like
float
for (i=2.15; i<=2.40; i+=.02)
printf("\f\t\f"; i, 100*i);
results on
2.150000 215.000010
2.170000 217.000008
2.190000 219.000006
2.210000 221.000004
2.230000 223.000002
2.250000 225.000000
2.270000 226.999998
2.290000 228.999996
2.310000 230.999994
2.330000 232.999992
2.350000 234.999990
2.370000 236.999989
2.390000 238.999987
^^^^^^^^^^
Isnīt this very poor????? I mean, if floats have a 6 decimals precision,
one would expect an error less than exp(-6), right?? My myenv.txt goes
like
GO32=ansi driver c:/djgpp/drivers/VESA_S3.grn
no fp emulation (I use a i486DX2)!!! Is fp calculation that bad with
djgpp? Doesn't it implement arithmetics with a (double) cast?
Thanks in advance for any hint!
Helder
- Raw text -