Skip to main content

quotient_upper_bound

Function quotient_upper_bound 

Source
fn quotient_upper_bound<'a>(
    expr: &'a SymExpr,
    facts: &OrderFacts<'a>,
    bounds: &ConstraintContext,
) -> Option<(&'a SymExpr, &'a SymExpr, &'a SymExpr, Rounding)>
Expand description

Returns a rounded quotient that expr is at most.

These bounds follow from the Euclidean relation x * y == q * d + r with q = floor(x * y / d) and r = mulmod(x, y, d) < d, so ceil(x * y / d) is q + (r != 0).