JuliaLang/julia — comment on commit b08f7e1385e70f5e31bd1921670c919c06dbd2a1
File:  line 0
By JeffBezanson:

Definitely `div(Unsigned. Signed)`. Then `div(Signed, Unsigned)`, then `rem(Signed,Unsigned)`.
Actually, the first thing to try is integer `copysign`. Making just that an intrinsic might be enough to cover all these.