in a 64-bit word as long as . This allows us to handle the following exponent sizes:
In order to define the degree with a unique signature for all of these values of , we assume that we only deal with monomials of degree less than . Note that this only affects the case .
It turns out that, for many operations on monomials, this form is very convenient in the sense that the operation can be performed on as one word instead of involving words. Examples of this are multiplication and division, which correspond to addition and subtraction, and the inverse lexicographical order, which corresponds to the operator
<. As an aside, the problem of possible overflow is burried in the our assumption that no monomial operation will involve partial exponents exceeding . Other operations, for example, checking whether one monomial is divisible by another, involve explicitly considering partial exponents using bitmasks.
In this context, it is very useful to note that, in the inverse lexicographic ordering, we have if and only . While the first test could involve word comparisons plus the overhead of a loop, the second test only involves one word comparison.