Crate half [] [src]

A crate that provides support for the half-precision floating point type.

This crate provides the f16 type, which is an implementation of the IEEE 754-2008 binary16 floating point type. This 'half' precision floating point type is intended for efficient storage where the full range and precision of a larger floating point value is not required. This is especially useful for image storage formats.

Because f16 is primarily for efficient storage, floating point operations are not implemented. Operations should be performed with f32 or higher-precision types and converted to/from f16 as necessary.

Some hardware architectures provide support for 16-bit floating point conversions. Enable the use-intrinsics feature to use LLVM intrinsics for hardware conversions. This crate does no checks on whether the hardware supports the feature.

Modules

consts

Useful f16 constants.

Structs

f16

The 16-bit floating point type.