| Crates.io | float8 |
| lib.rs | float8 |
| version | 0.4.2 |
| created_at | 2024-10-06 16:37:25.760657+00 |
| updated_at | 2025-08-11 21:54:46.887393+00 |
| description | 8-bit floating point types for Rust |
| homepage | https://github.com/EricLBuehler/float8 |
| repository | https://github.com/EricLBuehler/float8 |
| max_upload_size | |
| id | 1399196 |
| size | 149,290 |
float8: 8-bit floating point types for RustThis crate provides 2 types:
F8E4M3: Sign + 4-bit exponent + 3-bit mantissa. More precise but less dynamic range.F8E5M2: Sign + 5-bit exponent + 2-bit mantissa. Less precise but more dynamic range (same exponent as f16).Generally, this crate is modelled after the half crate, so it can be
used alongside and with minimal code changes.
no_std supportstd - Enable features that depend on the Rust standard library.serde - Add support for the serde crate with Serialize and Deserialize traits.num-traits - Implement traits from num-traits such as ToPrimitive, FromPrimitive, AsPrimitive, Num, Float, FloatCore, and Bounded.bytemuck - Implement traits from bytemuck including Zeroable and Podzerocopy - Implement traits from zerocopy including AsBytes and FromBytesrand_distr - Implement traits from rand_distr including Distribution and othersrkyv - Enable zero-copy deserialization with rkyv.