I use AWK (C-like programming language used to parse tables - and, yes, I know that's primitive of me). Check out the following behaviour
for (x=0.01;x<=0.05;x+=0.01) Stops at 0.05 as expected
for (x=0.01;x<=0.06;x+=0.01) Stops at 0.05
for (x=0.01;x<=0.06000001;x+=0.01) Stops at 0.06 as expected
for (x=0.1;x<=0.6;x+=0.1) Stops at 0.6, as expected
for (x=0.01;x<=0.10;x+=0.01) Stops at 0.10 as expected and steps through 0.06 just fine
Possible maths library bug? Anybody else able to confirm this perhaps with C (I am not sure, but I presume AWK uses C's maths libraries)?
Mac OS X 10.8.2
iMac 27" i7
for (x=0.01;x<=0.05;x+=0.01) Stops at 0.05 as expected
for (x=0.01;x<=0.06;x+=0.01) Stops at 0.05
for (x=0.01;x<=0.06000001;x+=0.01) Stops at 0.06 as expected
for (x=0.1;x<=0.6;x+=0.1) Stops at 0.6, as expected
for (x=0.01;x<=0.10;x+=0.01) Stops at 0.10 as expected and steps through 0.06 just fine
Possible maths library bug? Anybody else able to confirm this perhaps with C (I am not sure, but I presume AWK uses C's maths libraries)?
Mac OS X 10.8.2
iMac 27" i7
Last edited: