I have some code where I have bins that I place certain objects based on their score. If the score falls within certain a certain interval, it gets placed in a bin. For example,
If 0<x<=1 then object goes in bin 1
If 1<x<=2 then object goes in bin 2
If 2<x<=3 then object goes in bin 3
The problem arises that, if I run this code back to back, I get certain inconsistencies. For example, an object can be placed in bin 2 on the first run, and bin 3 on the second run. I believe these are boundary cases where the object has an x score very very close to 2, and on the first run it rounds it equal to 2 and places it in bin 2, and on the second run may round it differently, where x is now slightly larger than 2, and place it in bin 3.
How can I solve this problem?