Any idea why if typed into spotlight search, the first formula results in 1E-29, while second formula result in 0?
Can a step-by-step explanation be had as to why this bug exists?
It's clear this calculation is performed with floating-point arithmetic, though I believe as there is no "floating-point" per-se in this calculation, the inequality is a bug, and not a result of floating-point arithmetic limitations. My intuition tells me this could be done with only integer arithmetic as there is no negative value and no decimal point.
To be clear, I don't rely on my intuition, and I'm happy to be told that it is wrong, if that is indeed the case. I'm just interested in the specific anomaly that leads to this inaccuracy.
(1024*64) - (2^16) = 1E-29 (1024*128) - (2^17) = 0