Waldemar Horwat (2013-07-25T19:11:46.000Z)
domenic at domenicdenicola.com (2013-07-25T19:58:04.233Z)
It's not equivalent for values greater than 2^31. The `|` version wraps around; `div` would give the correct answer.
domenic at domenicdenicola.com (2013-07-25T19:55:28.852Z)
On Thu, Jul 25, 2013 at 12:00 PM, Brendan Eich <brendan at mozilla.com> wrote: > This turns out to be equivalent to > > ```js > (a/b)|0 > ``` > > which is how asm.js optimizes to avoid the FPU already. It's not equivalent for values greater than 2^31. The `|` version wraps around; `div` would give the correct answer.