Next: , Up: Comparisons involving poly_int   [Contents][Index]


10.3.1 Comparison functions for poly_int

poly_int provides the following routines for checking whether a particular condition “may be” (might be) true:

maybe_lt maybe_le maybe_eq maybe_ge maybe_gt
                  maybe_ne

The functions have their natural meaning:

maybe_lt(a, b)

Return true if a might be less than b.

maybe_le(a, b)

Return true if a might be less than or equal to b.

maybe_eq(a, b)

Return true if a might be equal to b.

maybe_ne(a, b)

Return true if a might not be equal to b.

maybe_ge(a, b)

Return true if a might be greater than or equal to b.

maybe_gt(a, b)

Return true if a might be greater than b.

For readability, poly_int also provides “known” inverses of these functions:

known_lt (a, b) == !maybe_ge (a, b)
known_le (a, b) == !maybe_gt (a, b)
known_eq (a, b) == !maybe_ne (a, b)
known_ge (a, b) == !maybe_lt (a, b)
known_gt (a, b) == !maybe_le (a, b)
known_ne (a, b) == !maybe_eq (a, b)