diff --git a/src/internal/fuzz/encoding_test.go b/src/internal/fuzz/encoding_test.go index 4b55892acd..3a614f5bd2 100644 --- a/src/internal/fuzz/encoding_test.go +++ b/src/internal/fuzz/encoding_test.go @@ -104,6 +104,12 @@ float32(2.5)`, ok: true, }, { + // The two IEEE 754 bit patterns used for the math.Float{64,32}frombits + // encodings are non-math.NAN quiet-NaN values. Since they are not equal + // to math.NaN(), they should be re-encoded to their bit patterns. They + // are, respectively: + // * math.Float64bits(math.NaN())+1 + // * math.Float32bits(float32(math.NaN()))+1 in: `go test fuzz v1 float32(-0) float64(-0) @@ -113,8 +119,8 @@ float32(NaN) float64(+Inf) float64(-Inf) float64(NaN) -math.Float64frombits(9221120237041090560) -math.Float32frombits(2143289343)`, +math.Float64frombits(9221120237041090562) +math.Float32frombits(2143289345)`, ok: true, }, }