
7 Jan
2009
7 Jan
'09
1:13 p.m.
Even though I'm fully aware of these issues using computers, it continues to amase me... ;-) for (double cutoff = 0.0; cutoff <= 1.0; cutoff += 0.05) results in these values for "cutoff": 0.0 0.05 0.1 0.15000000000000002 0.2 0.25 0.3 0.35 0.39999999999999997 0.44999999999999996 etc. Not ending with 1.0, as you'd hope, but with 0.9500000000000003 (right, I know, take an int as loop variable and calculate the double inside the loop, but still ;-)) Sofie