From b9408396ce40e8013116090acc19a4476527c530 Mon Sep 17 00:00:00 2001 From: Jan Pfeifer Date: Mon, 29 Apr 2024 08:31:43 +0200 Subject: [PATCH] Added a comment about the -24 binary exponent. --- float16_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/float16_test.go b/float16_test.go index b12ab91..533ae69 100644 --- a/float16_test.go +++ b/float16_test.go @@ -797,7 +797,7 @@ func checkRoundTrippedPrecision(t *testing.T, u32 uint32, u16 uint16, u32bis uin } func TestSmallestNonzero(t *testing.T) { - want := float32(0x1p-24) + want := float32(0x1p-24) // -15 + 1 - 10 if float16.SmallestNonzero.Float32() != want { t.Errorf("Invalid SmallestNonzero to float32 conversion: Float16=%s, wanted %g", float16.SmallestNonzero, want) }