pub fn to_bf16_rne(x: f32) -> f32
Round an f32 to bf16 precision with round-to-nearest-even, as torch’s bf16 cast does.