JavaScript Integer math incorrect results
I am just trying to implement a simple RNG in JS. What's happening is javascript evaluates 119106029 * 1103515245 to be 131435318772912110 rather than 131435318772912105 . We know it's wrong since two odd numbers multiplied does not give an even number. Anyone know what's up? I just want a reliable repeatable RNG, and because of these incorrect values I can't get results to match up with my C implementation of the same thing. Per the ECMAScript standard, all numbers in JavaScript are (64-bit IEEE 754) floating-point numbers. However all 32-bit integers can be exactly represented as floating