popcount :-
Count set bits in an integral number.
KnownBits:-
Captures both compile time know ZEROS and ONE bits in the value range.
KnownBits to Range:-
- MAX = ~ZEROS
- MIN = ONES
Proof:-
- ZEROS and ONES are inferred out of common prefix of value range delimiting bounds.
- Thus, ~ZEROS will not only include common prefix but will also set all other bits
not included in common prefix, which also cover set bits in non-common prefix of
actual value range b/w delimiting bounds.
Result Value Range:-
- TypeInt::make(popcount(ONES), popcount(~ZEROS));
Proof:-
- Given that ~ZEROS >= UB >= LB >= ONES
- Therefore, popcount(~ZEROS) will always be guarantted to be greater than popcount(ONES).
- Also, popcount(~ZEROS) >= Res.UB >= Res.LB >= popcount(ONES)
Count set bits in an integral number.
KnownBits:-
Captures both compile time know ZEROS and ONE bits in the value range.
KnownBits to Range:-
- MAX = ~ZEROS
- MIN = ONES
Proof:-
- ZEROS and ONES are inferred out of common prefix of value range delimiting bounds.
- Thus, ~ZEROS will not only include common prefix but will also set all other bits
not included in common prefix, which also cover set bits in non-common prefix of
actual value range b/w delimiting bounds.
Result Value Range:-
- TypeInt::make(popcount(ONES), popcount(~ZEROS));
Proof:-
- Given that ~ZEROS >= UB >= LB >= ONES
- Therefore, popcount(~ZEROS) will always be guarantted to be greater than popcount(ONES).
- Also, popcount(~ZEROS) >= Res.UB >= Res.LB >= popcount(ONES)