]> Cypherpunks repositories - gostls13.git/commitdiff
math/big: fix minor documentation issue
authorRobert Griesemer <gri@golang.org>
Fri, 13 Mar 2015 21:20:07 +0000 (14:20 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 13 Mar 2015 21:30:11 +0000 (21:30 +0000)
Change-Id: Ib42f75c03573cec16801b79a6eb9b1b542028f4f
Reviewed-on: https://go-review.googlesource.com/7524
Reviewed-by: Alan Donovan <adonovan@google.com>
src/math/big/float.go
src/math/big/float_test.go

index feca6921a078f938d7ea22cf13a31db2584bc560..44691c4783955d948564296a4c38fe2e571561b3 100644 (file)
@@ -289,7 +289,7 @@ func (z *Float) setExp(e int64) {
 // not require 0.5 <= |mant| < 1.0. Specifically:
 //
 //     mant := new(Float)
-//     new(Float).SetMantExp(mant, x.SetMantExp(mant)).Cmp(x) == 0
+//     new(Float).SetMantExp(mant, x.SetMantExp(mant)).Cmp(x).Eql() is true
 //
 // Special cases are:
 //
index cc38f68436f9cae5e12ab56052bbfd3441ccfe94..86b1c6f7a1ac2842ca524d031059839ad96a34e0 100644 (file)
@@ -279,7 +279,7 @@ func TestFloatSetMantExp(t *testing.T) {
                }
                // test inverse property
                mant := new(Float)
-               if z.SetMantExp(mant, want.MantExp(mant)).Cmp(want) != 0 {
+               if z.SetMantExp(mant, want.MantExp(mant)).Cmp(want).Neq() {
                        t.Errorf("Inverse property not satisfied: got %s; want %s", z.Format('g', 10), test.z)
                }
        }