Skip to main content

evaluate_number

Function evaluate_number 

Source
pub fn evaluate_number(
    expr: &Expr,
    bindings: &BTreeMap<String, Number>,
    numeric: &NumericContext,
    limits: &Limits,
    calls: &NumberCalls<'_>,
) -> Result<Number, EngineError>
Expand description

Evaluate an expression exactly, using the shared numeric contract.

Supported: integer/decimal/rational literals, bindings, unary sign, + - * / % ^, and calls resolved by calls. Comparisons, booleans, arrays, records, and text are rejected with a clear error.