Skip to content

Commit

Permalink
Added a comment about the -24 binary exponent.
Browse files Browse the repository at this point in the history
  • Loading branch information
janpfeifer committed Apr 29, 2024
1 parent db1ee2c commit b940839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion float16_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit b940839

Please sign in to comment.