I setup an array of value for setting the image_xscale start from 1 to 0.1, decrement of 0.1. image_xscale = array[index]; so what I expect is that as the loop continue, the image_xscale should follow the array value, but what I get is decimal slightly smaller than the value I set it to, why is that? Is there a way to stop this from happening?

I tried this before the array and I get decimal numbers. I then used array but I still get decimal numbers. It's not that I did not did what you suggested. I did.

so do you want decimal or not? I don't understand what you want if you're subtracting by decimal values you're going to get a decimal value

You subtract a decimal value from another value and your result is a decimal? I can't possibly imagine why? Maybe you should tell us what your interpretation a decimal number is?

Sorry, what I mean is: originally: image_xscale = 1; image_xscale -= 0.1; (give me 0.90000133433434) and becoz of that, if image_xscale == 0.9 does not work is there a way to prevent getting 0.900000010203020?

That makes more sense. It looks like a floating point error and is a big reason why you shouldn't use == for non-int number comparisons. It might be helpful to look at this comments: https://forum.yoyogames.com/index.p...loating-point-number-error.64072/#post-383929 https://forum.yoyogames.com/index.php?threads/getting-a-hold-of-if-statements.53182/#post-325167 You haven't posted your code so it is still difficult to suggest an alternative to your solution.

That's how 'double precision' works. Which is how computers work. I'd never recommend comparing against exact values as they will no doubt be stored differently internally. I'd compare with greater or less than.

You start with a value of 1. You subtract 0.1 from that value, you expect 0.9. so traffic is 0.1 again you expect 0.8. the problem is you are not actually working with decimals, you are working with floating points. Most of those values are not compatible with floating points; you can get a damned near close approximation, but rarely that exact number. that is likely what you are seeing in the discrepancies. If for whatever reason you need more precision, set your values to whole numbers and then divide by 10.

Youre doing HTML export, aren't you? Beacuse this html export is having this issue for a long time where 1 + 1 is not equal to 2, but to 2,00000001961561 Rounding seems like the only solution