f32_to_e8m0_rne

Function f32_to_e8m0_rne 

Source
pub fn f32_to_e8m0_rne(x: f32) -> f32
Expand description

Torch’s f32 -> e8m0 cast, as a power of two: nearest exponent, ties (exactly 1.5 * 2^e) to the even exponent. Pinned against the fixture’s shipped scales by e8m0_rounding_rule_matches_torch.