Skip to main content

f32_to_f16

Function f32_to_f16 

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

Round an f32 to an IEEE-754 binary16 bit pattern, round-to-nearest-ties-even (overflow→Inf, underflow→subnormal/0, NaN→canonical qNaN). The one rounding step in the f16 reference; anchored by known-value assertions in simd_tile_lock.