J
Jeff.M
I need to do multiplication that mirrors how C handles integer
multiplication. That is, one 32-bit number times another 32-bit number
equals the least significant 32-bits of the 64-bit result.
In theory, I could mimic that behavior like so:
(x * x) & 0xFFFFFFFF
But this doesn't work quite right because the initial multiplication
can produce such a large result that JavaScript looses some precision.
Any thoughts? Ideas?
multiplication. That is, one 32-bit number times another 32-bit number
equals the least significant 32-bits of the 64-bit result.
In theory, I could mimic that behavior like so:
(x * x) & 0xFFFFFFFF
But this doesn't work quite right because the initial multiplication
can produce such a large result that JavaScript looses some precision.
Any thoughts? Ideas?