The following script contains a very strange error. I want to check if a value is a positive integer. To do this, I multiply by 100 to enclose the value to decimal. If I tes
That's called numerical math. Computers do not operate on real numbers but on their approximation and this approximation brings rounding errors such as this one.
For 0.05, 0.06 and 0.08 you are lucky that these have an exact floating point representation on your PC. This is not the case of 0.07. Note that on a different PC/browser the result might be different.
For more info see the IEEE floating point format specification.