Skip to main content

fp8e4m3_to_f32

Function fp8e4m3_to_f32 

Source
pub fn fp8e4m3_to_f32(bits: u8) -> f32
Expand description

Convert one TOSA/OCP FP8 E4M3 bit pattern to an exactly representable f32 value.

E4M3 has no infinities. Exponent 0b1111 remains finite except when the fraction is 0b111, which represents NaN.