Using integer math alone, I\'d like to \"safely\" average two unsigned ints in C++.
What I mean by \"safely\" is avoiding overflows (and anything else that can be th
unsigned int average = low + ((high - low) / 2);
EDIT
Here's a related article: http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html