Precision problem? (Program Bug and Problems)

by Jim ⌂ @, Russell, KY, Monday, September 09, 2013, 02:21 (1359 days ago) @ joan

I have come out with this problem:
for t=0 to 10 step 0.01
if t=int(t) then print t
next t
Does not print integer numbers (1 to 10)

I've tried several ways (using auxiliary variables) but none seem to 'compare' properly the 'float' variable and the 'integer' variable.

Thank you in advance.
Joan

OK. I have replicated and have added a work around in 0.9.9.68 which I just released. Your code works for .1, .01, .001, .001, .0001 at least. Let me know if you have any further issues.

Jim


Complete thread:

 RSS Feed of thread

powered by my little forum