News for hackers. Stuff that matters.
Re:How do you compute the midpoint of an interval? (2014) [pdf] by Sean1708 on Friday March 29, 2019 @10:14AM (#19521846)

  In C and C++ (where you don't have the >>> operator), you can do this:

    6:             mid = ((unsigned int)low + (unsigned int)high)) >> 1;
Since you're casting to unsigned int anyway, can't you just use / 2?
Re:How do you compute the midpoint of an interval? (2014) [pdf] by kevinventullo on Friday March 29, 2019 @10:46AM (#19522125)
Yeah, I believe those compile to the same thing for unsigned ints. You can confirm using godbolt.