Mr Initial Man wrote:
Is it because I'm converting strings to numbers?
No. It is because the CPU uses binary to calculate, or some finite floated decimal numbers become periodical when translated into binary. Thus, the CPU has to perform an approximation, a rounding of that binary. Sometimes, the sum or those small roundings superadd into a final error while translating decimal-binary back and forth.
In fact, it is only an error of display, not calculation, thus it is enough to use toFixed() method in order to bypass that, but only after you finished all the math operations and you want to display the final result. Or, if you want, you may first multiply the floated number with 10 risen to the proper power(n) before the math operation - in order to avoid using floated values - and divide, later, the result with the same 10n factor.