Remove ExpInt from Float, always use i32 instead

`ExpInt` is likely to only have performance benefits on 16-bit
platforms, but makes working with the exponent more difficult. It seems
like a worthwhile tradeoff to instead just use `i32`, so do that here.
This commit is contained in:
Trevor Gross
2025-01-11 23:40:19 +00:00
committed by Trevor Gross
parent 5e13eeca01
commit 721960c172
3 changed files with 10 additions and 19 deletions

View File

@@ -20,7 +20,6 @@ pub struct f8(u8);
impl Float for f8 {
type Int = u8;
type SignedInt = i8;
type ExpInt = i8;
const ZERO: Self = Self(0b0_0000_000);
const NEG_ZERO: Self = Self(0b1_0000_000);
@@ -62,10 +61,6 @@ impl Float for f8 {
self.0 & Self::SIGN_MASK != 0
}
fn exp(self) -> Self::ExpInt {
unimplemented!()
}
fn from_bits(a: Self::Int) -> Self {
Self(a)
}