Registry / utility / half
library2.7.1rscratesunverified

Half-precision floating point f16 and bf16 types for Rust implementing the IEEE 754-2008 standard binary16 and bfloat16 types.

# Cargo.toml [dependencies] half = "2.7.1"
INSTALL
IMPORT
SIG · HALF
H
half
utilityrustv2.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

f16
use half::f16;

Converts a 32-bit float to half-precision and back.

use half::f16; fn main() { let a = f16::from_f32(3.14); println!("f16 value: {}", a.to_f32()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.7.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
half — cargo add half · libregistry