From Fabrice Bellard, with minor name change (umulh
):
// return the high 32 bit part of the 64 bit addition of (hi0, lo0) and (hi1, lo1)
Math.iaddh(lo0, hi0, lo1, hi1)
// return the high 32 bit part of the 64 bit subtraction of (hi0, lo0) and (hi1, lo1)
Math.isubh(lo0, hi0, lo1, hi1)
// return the high 32 bit part of the signed 64 bit product of the 32 bit numbers a and b