Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

jvilk

Member since
jvilk

Recent Docs Activity

View all activity
Page Date Comment

Math.imul()


Sorry about my previous revision; this one is correct. The >>>0 coerces the upper bits into an unsigned quantity which is added to the lower bits, and the |0 brings the total back into signed territory.

Math.imul()


The given imul polyfill can produce values > 32 bits, since the high part can overflow. For example, try running it with 0xffffffff and 5. The high part needs to be truncated to 32-bits; hence the |0.