08-08-2004, 09:34 AM
I had a problem with things acting oddly in my program. When I investigated I found something really strange.
example:
cls
do
print b;
b=b+.1
a=a+1
loop until a=70
this is the result I received:
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8000001 .9000001 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.799999 2.899999 2.999999 3.099999 3.199999 3.299999 3.399999 3.499999 3.599999 3.699999 3.799999 3.899998 3.999999 4.099999 4.199999 4.299999 4.399999 4.499999 4.599999 4.699999 4.799999 4.899999 4.999999 5.099998 5.199997 5.299997 5.399997 5.499997 5.599997 5.699997 5.799997 5.899997 5.999997 6.099997 6.199996...............
example:
cls
do
print b;
b=b+.1
a=a+1
loop until a=70
this is the result I received:
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8000001 .9000001 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.799999 2.899999 2.999999 3.099999 3.199999 3.299999 3.399999 3.499999 3.599999 3.699999 3.799999 3.899998 3.999999 4.099999 4.199999 4.299999 4.399999 4.499999 4.599999 4.699999 4.799999 4.899999 4.999999 5.099998 5.199997 5.299997 5.399997 5.499997 5.599997 5.699997 5.799997 5.899997 5.999997 6.099997 6.199996...............