value range propagation for _bitwise_ OR

Ali Çehreli acehreli at yahoo.com
Sat Apr 10 21:54:47 PDT 2010


Adam D. Ruppe wrote:

 > I am pretty convinced that to get the
 > perfect solution, the max_c function needs to know min_a and min_b too.

Absolutely! :) I had just started writing an e-mail about it.

Andrei Alexandrescu wrote:
 >> On to the next task: compute minOR and maxOR for _signed_ values. It
 >> turns out minOR its also nontrivial...

How about computing minOR for unsigned values first? ;)

The proposed solution of max(min_a, min_b) is correct only for a couple 
of corner cases.

Ali



More information about the Digitalmars-d mailing list