Skip to main content

f32_to_f16

Function f32_to_f16 

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

Convert an f32 to a 16-bit half-precision float (IEEE 754 binary16). This is a pure-Rust implementation with no external dependency.