Semantics of 2’s completement integer division

As part of a recent discussion on llvmdev, I had reason to go digging through a couple of language specs examining how they handle edge cases in integer division.  This post is just a summary, mostly so I don’t forget. As a reminder of the basic problem, division (a/b) on N bit 2’s complement integers …

Continue reading ‘Semantics of 2’s completement integer division’ »