It seems contradictory, but computers can't handle fractions /decimals well - there is always a limit to precision. You should always try to work with whole numbers, and only convert to a decimal at the last moment. So switch to counting by 1, and divide by 100 only when you need the actual scale value.