Hi
I have a loop that is iterating at approx 1000 times per second.
There is an IF statement nested inside that instructs the program to stop (return) if a variable < 5. However, the program seems to always miss this condition. Even stranger, for any value > 5, the IF condition is properly followed. The variable in question is starting out from a very large value and with each iteration of the loop, being descreased a certain amount. The variable never goes below zero.
Wondering if this is something wrong with my algorithm, or machine, or compiler..or all of the above =(
Not sure if this makes sense. I can elaborate. Please help if you can.
Thanks.
I have a loop that is iterating at approx 1000 times per second.
There is an IF statement nested inside that instructs the program to stop (return) if a variable < 5. However, the program seems to always miss this condition. Even stranger, for any value > 5, the IF condition is properly followed. The variable in question is starting out from a very large value and with each iteration of the loop, being descreased a certain amount. The variable never goes below zero.
Wondering if this is something wrong with my algorithm, or machine, or compiler..or all of the above =(
Not sure if this makes sense. I can elaborate. Please help if you can.
Thanks.
Comment