On 04/10/2010 04:21 PM, Adam D. Ruppe wrote:
On Sat, Apr 10, 2010 at 04:05:06PM -0500, Andrei Alexandrescu wrote:The minimum for unsigned numbers is very simple: min(mina, minb).mina = 1 minb = 0 min(1, 0) == 0 But, 1|0 == 1 max(mina, minb) looks to work though. Consider that ORing can only set bits - it can never take a one and spit out a zero. Therefore, x|y>= x&& x|y>= y, which only works on the max(mina, minb) function.
Sorry, I meant max of the two minima. Andrei