Skip to main content

compare

Function compare 

Source
pub fn compare(
    op: BinaryOpKind,
    left: &RuntimeValue,
    right: &RuntimeValue,
) -> Result<RuntimeValue, String>
Expand description

Relational comparison (< > <= >=).

Floats use IEEE 754 semantics — NaN is unordered (every relational comparison with a NaN is false) and -0.0 == 0.0 — matching Rust’s f64 ordering, which is what the compile-to-Rust path emits. Integer and temporal types use the natural total order; a Moment compares against a Time by its time-of-day.