A faster way to compute signed 64-bit floor division by constants
What is signed integer floor division?Signed integer floor division is where you do a/b and get a result that rounds towards −∞,whereas standard (“truncated”) signed division rounds towards 0.As stated in Hacker's Delight: “[I suspect that] floor division more often gives the result you want”.
Lobsters35 min read