From 3b126e7fa6c61c9e56d9f445081dfcb02530ecb1 Mon Sep 17 00:00:00 2001 From: numzero Date: Tue, 17 Feb 2026 05:26:36 +0300 Subject: [PATCH] document type properties --- src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ba65b21..7b04c13 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,17 @@ const E_BIAS: u8 = E_STORAGE_MAX - E_MAX; const M_MASK: u8 = M_STORAGE_MAX; const E_MASK: u8 = E_STORAGE_MAX << M_BITS; -/// 8-bit unsigned binary floating-point type, with [`M_BITS`] mantissa bits and [`E_BITS`] exponent bits. +/// 8-bit unsigned binary floating-point type. +/// +/// # Properties +/// +/// * Mantissa width: 5 bits ([`M_BITS`]) +/// * Exponent width: 3 bits ([`E_BITS`]) +/// * Negative values: not supported +/// * Zero: special-cased +/// * Subnormals: not supported +/// * Infinity: not supported +/// * NaN: not supported #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)] #[repr(transparent)] pub struct F8(u8);