News for hackers. Stuff that matters.
Re:Fast midpoint between two integers without overflow by zimpenfish on Wednesday December 07, 2022 @11:02AM (#33895902)
Is that the right way around? If `a<b` then `a-b` will be negative, surely, and adding that to `a` will be moving down from `a`, not from `a` to `b`?

cf https://go.dev/play/p/SgdWzzqDygn

Re:Fast midpoint between two integers without overflow by ardel95 on Wednesday December 07, 2022 @11:28AM (#33896307)
Eh, that’s what I get for writing code on a cell phone. Fixed.