pub fn values_equal(left: &RuntimeValue, right: &RuntimeValue) -> boolExpand description
Value equality for the equals/== operator, set/list membership, and
map keys (RuntimeValue’s PartialEq delegates here — ONE equality).
- Floats compare by IEEE
==(NaN != NaN,-0.0 == 0.0) — identical to what compiled Rust emits, on every engine. - Cross-type numeric equality is EXACT (mathematical value, never a lossy
cast):
1 == 1.0, but9007199254740993 != 9007199254740993.0because that float literal IS2^53. Coheres withcompareand with the unified numeric hash (base::numeric). - Collections, tuples, and structs compare STRUCTURALLY (same shape, all
parts equal), with an
Rcidentity fast path and a depth cap against cyclic values. - Decimal/Complex/Modular keep their documented within-type equality (they have no cross-type ordering, so there is no coherence to break).