value range propagation for logical OR
Justin Spahr-Summers
Justin.SpahrSummers at gmail.com
Sat Apr 10 10:22:40 PDT 2010
On Sat, 10 Apr 2010 12:01:45 -0500, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
>
> Consider:
>
> byte c = a | b;
>
> Say you already know min_a, max_a, min_b, and max_b. How do you compute
> min_c and max_c? I thought of it for a bit and it seems quite tricky.
>
>
> Thanks,
>
> Andrei
It seems like it would use the lowest minimum and the highest maximum of
the two... that's what I personally would find most natural, given the
semantics of bitwise OR, but maybe I'm just way off base.
More information about the Digitalmars-d
mailing list