Rounding error on percent of total and back <p>A and B are integers.</p> <p>Is it <strong>certain</strong>, with all the complexities of rounding errors in JavaScript, that:</p> <p><code>(A/(A+B))*(A+B) === A</code></p> <p>This is to say that if the user enters 10, and 20 for A and B respectively, can I store the summed total (30) with A = .33333333 and B = .66666666 and later multiply the sum by these decimals to get back to the value of 10 (with no rounding error)?</p>