Precision loss for 32-bit integer multiplication
iamahuman opened this issue · comments
Jinoh Kang commented
purescript-prelude/src/Data/Semiring.js
Lines 10 to 15 in a96663b
I can't believe this was never mentioned as an issue before.
Maybe replace this with Math.imul?
Gary Burgess commented
Jinoh Kang commented
My bad.
Closing as duplicate (but I think it might have fit here more...)
Gary Burgess commented
No worries, it's split between both! 🙂
The numeric operations are inlined by the compiler where it can (kinda, the compiler produces code equivalent to their implementation here, it doesn't technically inline since it doesn't look at the JS implementation of them).