Skip to main content

Module float16

Module float16 

Source
Expand description

A 16-bit floating point (“half precision”) type.

Rust does not yet have a stable built-in f16 type, so this module defines one as a wrapper around u16.

This can be replaced with f16 from the Rust standard library when that is stabilized. See https://github.com/rust-lang/rust/issues/116909.

Structs§

f16
A 16-bit floating point number, stored in IEEE 754 half-precision format.

Functions§

f16_to_f32
Convert an f16 value to f32.
f32_to_f16
Convert an f16 value to f32.