math/big: TestFloatSetFloat64String uses meaningless -0 floating point constant #19673
Labels
FrozenDueToAge
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
Go floating point constants do not support negative zero (or other IEEE-695 features). Despite that, there are several tests in
TestFloatSetFloat64String
in math/big/floatconv_test.go that use-0
as a constant value. If I change all instances of a constant-0
to simply0
, the test still passes. So the test as written is somewhat misleading.For example, the test includes these cases
which make it look like
"-0"
produces a different result than"+0"
. And maybe it does, but this test does not test that, as replacing the-0
constant with0
does not affect the test.The text was updated successfully, but these errors were encountered: