pub fn round_to(x: f64, ndigits: usize) -> f64
round(x, ndigits): correctly rounded on the binary value, ties to even — the same digits CPython’s float.__round__ produces.
round(x, ndigits)
float.__round__