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

Function try_to_float

crates/vm/src/builtins/int.rs:788–791  ·  view source on GitHub ↗
(int: &BigInt, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

786}
787
788pub fn try_to_float(int: &BigInt, vm: &VirtualMachine) -> PyResult<f64> {
789 bigint_to_finite_float(int)
790 .ok_or_else(|| vm.new_overflow_error("int too large to convert to float"))
791}
792
793fn vectorcall_int(
794 zelf_obj: &PyObject,

Callers 3

try_float_optMethod · 0.85
inner_powFunction · 0.85
int.rsFile · 0.85

Calls 2

bigint_to_finite_floatFunction · 0.85
ok_or_elseMethod · 0.80

Tested by

no test coverage detected