X Tutup
Skip to content

Commit a4bfe64

Browse files
committed
math/big: fix minor documentation issue
Change-Id: Ib42f75c03573cec16801b79a6eb9b1b542028f4f Reviewed-on: https://go-review.googlesource.com/7524 Reviewed-by: Alan Donovan <adonovan@google.com>
1 parent f658031 commit a4bfe64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/math/big/float.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func (z *Float) setExp(e int64) {
289289
// not require 0.5 <= |mant| < 1.0. Specifically:
290290
//
291291
// mant := new(Float)
292-
// new(Float).SetMantExp(mant, x.SetMantExp(mant)).Cmp(x) == 0
292+
// new(Float).SetMantExp(mant, x.SetMantExp(mant)).Cmp(x).Eql() is true
293293
//
294294
// Special cases are:
295295
//

src/math/big/float_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func TestFloatSetMantExp(t *testing.T) {
279279
}
280280
// test inverse property
281281
mant := new(Float)
282-
if z.SetMantExp(mant, want.MantExp(mant)).Cmp(want) != 0 {
282+
if z.SetMantExp(mant, want.MantExp(mant)).Cmp(want).Neq() {
283283
t.Errorf("Inverse property not satisfied: got %s; want %s", z.Format('g', 10), test.z)
284284
}
285285
}

0 commit comments

Comments
 (0)
X Tutup