Post #284 554 Nov 15, 2016, 20:15 UTC https://fgiesen.wordpress.com/2016/10/26/rounding-up-to-the-nearest-int-k-mod-n/Tags: #math #programming The ryg blog Rounding up to the nearest integer that’s congruent to k mod N It’s fairly well-known (among programmers anyway) that say rounding up x to the nearest multiple of 8 can be accomplished using the formula (x + 7) & ~7, and that in general rounding up t…