MCPcopy Index your code
hub / github.com/RustPython/RustPython / compactlong_float_guard

Function compactlong_float_guard

crates/vm/src/frame.rs:1210–1213  ·  view source on GitHub ↗
(lhs: &PyObject, rhs: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1208
1209#[inline]
1210fn compactlong_float_guard(lhs: &PyObject, rhs: &PyObject, vm: &VirtualMachine) -> bool {
1211 compact_int_from_obj(lhs, vm).is_some()
1212 && exact_float_from_obj(rhs, vm).is_some_and(|f| !f.is_nan())
1213}
1214
1215#[inline]
1216fn nonzero_compactlong_float_guard(lhs: &PyObject, rhs: &PyObject, vm: &VirtualMachine) -> bool {

Callers 1

Calls 3

compact_int_from_objFunction · 0.85
exact_float_from_objFunction · 0.85
is_nanMethod · 0.45

Tested by

no test coverage detected