good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: reliable get position of leftmost bit in large integersby martin (Friar) |
on Mar 12, 2015 at 13:39 UTC ( [id://1119791]=note: print w/replies, xml ) | Need Help?? |
To check whether the most significant bit positions of two unsigned integer values are equal (or both are zero), this works for me:
Update: Added the words "unsigned integer" in the first paragraph.
In Section
Seekers of Perl Wisdom
|
|