Crates.io | minifloat |
lib.rs | minifloat |
version | 0.1.6 |
source | src |
created_at | 2024-05-07 13:24:20.184186 |
updated_at | 2024-05-22 13:36:02.313783 |
description | Emulate various minifloats with const generics |
homepage | |
repository | https://github.com/jdh8/minifloat-rs |
max_upload_size | |
id | 1232167 |
size | 69,996 |
Rust const generic library for minifloats
This crate provides emulation of minifloats up to 16 bits. This is done with
two generic structs, F8
and F16
, which take up to 8 and 16 bits of storage
respectively. Many parameters are configurable, including
F8
-only) Exponent biasF8
-only) NaN encodings: IEEE, FN, or FNUZNote that there is always a sign bit, so F8<4, 3>
already uses up all 8 bits:
1 sign bit, 4 exponent bits, and 3 significand bits.