fn round_half_to_even(x: f64) -> f64
IEEE 754 round-half-to-even: if the fractional part is exactly 0.5, round to the nearest even integer. Otherwise round normally.