Skip to main content

f32_to_f16_bits

Function f32_to_f16_bits 

Source
pub fn f32_to_f16_bits(value: f32) -> u16
Expand description

The binary16 bit pattern nearest to value, round-to-nearest-even. NaN is canonicalized to the quiet 0x7e00 payload with its sign; magnitudes at or above 65520 round to infinity, and subnormals are produced, never flushed).