We determine the exact AND-gate cost of checking if $a\leq x < b$, where $a$ and $b$ are constant integers. Perhaps surprisingly, we find that the cost of interval checking never exceeds that of a single comparison and, in some cases, it is even lower.
翻译:我们决定了检查$a\leq x < b$(a美元和b美元是不变的整数)的准确成本。 也许令人惊讶的是,我们发现间歇检查的成本从未超过一次比较的成本,在某些情况下甚至更低。