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

Function fsum

crates/stdlib/src/math.rs:426–430  ·  view source on GitHub ↗
(seq: ArgIterable<ArgIntoFloat>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

424
425 #[pyfunction]
426 fn fsum(seq: ArgIterable<ArgIntoFloat>, vm: &VirtualMachine) -> PyResult<f64> {
427 let values: Result<Vec<f64>, _> =
428 seq.iter(vm)?.map(|r| r.map(|v| v.into_float())).collect();
429 pymath::math::fsum(values?).map_err(|err| pymath_exception(err, vm))
430 }
431
432 #[pyfunction]
433 fn modf(x: ArgIntoFloat) -> (f64, f64) {

Callers 7

fmeanFunction · 0.90
geometric_meanFunction · 0.90
covarianceFunction · 0.90
correlationFunction · 0.90
linear_regressionFunction · 0.90
gammaFunction · 0.90
overlap_numericMethod · 0.85

Calls 5

pymath_exceptionFunction · 0.85
collectMethod · 0.80
into_floatMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45

Tested by 2

gammaFunction · 0.72
overlap_numericMethod · 0.68