3 ms·
Not sure why this has been downvoted. It is entirely correct to point out that counting the number of leading zeros is not the same as a less-than comparison.
by vog 11y ago
Not sure why this has been downvoted. It is entirely correct to point out that counting the number of leading zeros is not the same as a less-than comparison.
The less-than comparison is more fine-grained, while counting the number of leading zeros is just a nice approximation that is used for laymen explainations.
For example, if your threshold is 00001011, you will accept "00001010" but not "00001100", despite both having the same number of (four) leading zeros.