value range propagation for logical OR

bearophile bearophileHUGS at lycos.com
Sat Apr 10 10:56:04 PDT 2010


Andrei Alexandrescu:
> 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.

This is Interval arithmetic. If you are able to find a book about it... (or a library for some programming language that implements it).

Bye,
bearophile



More information about the Digitalmars-d mailing list