Computing bounds on poly_ints#
poly_int also provides routines for calculating lower and upper bounds:
constant_lower_bound (a)Assert that
ais nonnegative and return the smallest value it can have.constant_lower_bound_with_limit (a, b)Return the least value
acan have, given that the context in whichaappears guarantees that the answer is no less thanb. In other words, the caller is asserting thatais greater than or equal tobeven ifknown_ge (a, b)doesn’t hold.constant_upper_bound_with_limit (a, b)Return the greatest value
acan have, given that the context in whichaappears guarantees that the answer is no greater thanb. In other words, the caller is asserting thatais less than or equal tobeven ifknown_le (a, b)doesn’t hold.lower_bound (a, b)Return a value that is always less than or equal to both
aandb. It will be the greatest such value for some indeterminate values but necessarily for all.upper_bound (a, b)Return a value that is always greater than or equal to both
aandb. It will be the least such value for some indeterminate values but necessarily for all.