In general I'm against optimizations done during the coding process itself. Most of the time there's a straightforward solution which works quite well. Optimizing time-critical code is another question.

But some people don't even code proper "normal" code (not optimized!) which gets lengthened and stretched half-way across the globe without getting to the point.

edit: you're right, Larry, your code will work, given that the overflow and underflow don't throw an exception and are reversible - but in c this should be the case, doesn't it?

Last edited by Joey; 12/20/09 13:39.