From: Robert Griesemer Date: Fri, 13 Mar 2015 21:20:07 +0000 (-0700) Subject: math/big: fix minor documentation issue X-Git-Tag: go1.5beta1~1603 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a4bfe64f00f09b5d98cc7bb680b768af1bebebc9;p=gostls13.git math/big: fix minor documentation issue Change-Id: Ib42f75c03573cec16801b79a6eb9b1b542028f4f Reviewed-on: https://go-review.googlesource.com/7524 Reviewed-by: Alan Donovan --- diff --git a/src/math/big/float.go b/src/math/big/float.go index feca6921a0..44691c4783 100644 --- a/src/math/big/float.go +++ b/src/math/big/float.go @@ -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: // diff --git a/src/math/big/float_test.go b/src/math/big/float_test.go index cc38f68436..86b1c6f7a1 100644 --- a/src/math/big/float_test.go +++ b/src/math/big/float_test.go @@ -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) } }