@@ -18,10 +18,10 @@ func modes() []RoundingMode {
1818
1919func TestAddWithMode_RoundingMatchesConverter (t * testing.T ) {
2020 cases := [][2 ]float32 {
21- {1.0 , float32 (math .Pow (2 , - 11 ))}, // halfway between 1.0 and next
22- {1.0 , 1e-3 }, // general positive
23- {- 1.0 , float32 (math .Pow (2 , - 11 ))}, // negative with halfway increment
24- {- 0.75 , 0.125 }, // mixed signs, exact binary fractions
21+ {1.0 , float32 (math .Pow (2 , - 11 ))}, // halfway between 1.0 and next
22+ {1.0 , 1e-3 }, // general positive
23+ {- 1.0 , float32 (math .Pow (2 , - 11 ))}, // negative with halfway increment
24+ {- 0.75 , 0.125 }, // mixed signs, exact binary fractions
2525 }
2626
2727 for _ , c := range cases {
@@ -47,10 +47,10 @@ func TestAddWithMode_RoundingMatchesConverter(t *testing.T) {
4747
4848func TestMulWithMode_RoundingMatchesConverter (t * testing.T ) {
4949 cases := [][2 ]float32 {
50- {1.25 , 0.2 }, // positive * positive
51- {- 1.25 , 0.2 }, // negative * positive
52- {1.5 , - 0.75 }, // positive * negative
53- {- 0.5 , - 0.125 }, // negative * negative
50+ {1.25 , 0.2 }, // positive * positive
51+ {- 1.25 , 0.2 }, // negative * positive
52+ {1.5 , - 0.75 }, // positive * negative
53+ {- 0.5 , - 0.125 }, // negative * negative
5454 {float32 (math .Pow (2 , - 3 )), float32 (math .Pow (2 , - 8 ))}, // exact powers of two
5555 }
5656
@@ -77,11 +77,11 @@ func TestMulWithMode_RoundingMatchesConverter(t *testing.T) {
7777
7878func TestDivWithMode_RoundingMatchesConverter (t * testing.T ) {
7979 cases := [][2 ]float32 {
80- {1.25 , 0.2 }, // positive / positive
81- {- 1.25 , 0.2 }, // negative / positive
82- {1.5 , - 0.75 }, // positive / negative
83- {- 0.5 , - 0.125 }, // negative / negative
84- {7.0 , 3.0 }, // non-terminating in binary
80+ {1.25 , 0.2 }, // positive / positive
81+ {- 1.25 , 0.2 }, // negative / positive
82+ {1.5 , - 0.75 }, // positive / negative
83+ {- 0.5 , - 0.125 }, // negative / negative
84+ {7.0 , 3.0 }, // non-terminating in binary
8585 }
8686
8787 for _ , c := range cases {
0 commit comments