summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-05-03 18:48:05 -0700
committerRobert Griesemer <gri@golang.org>2010-05-03 18:48:05 -0700
commit8100a94c4a2b2bf1ac99d13aaaf5d6fcaa663d32 (patch)
tree3ee2c6961586d01143436c28521c2ea8e4e8806a /test
parent412ab4139d09839f351245f09749efe342c45c94 (diff)
downloadgolang-8100a94c4a2b2bf1ac99d13aaaf5d6fcaa663d32.tar.gz
big: completed set of Int division routines & cleanups
- renamed Len -> BitLen, simplified implementation - renamed old Div, Mod, DivMod -> Que, Rem, QuoRem - implemented Div, Mod, DivMod (Euclidian definition, more useful in a mathematical context) - fixed a bug in Exp (-0 was possible) - added extra tests to check normalized results everywhere - uniformly set Int.neg flag at the end of computations - minor cosmetic cleanups - ran all tests R=rsc CC=golang-dev http://codereview.appspot.com/1091041
Diffstat (limited to 'test')
-rw-r--r--test/bench/pidigits.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/bench/pidigits.go b/test/bench/pidigits.go
index a05515028..dcfb502ce 100644
--- a/test/bench/pidigits.go
+++ b/test/bench/pidigits.go
@@ -81,8 +81,8 @@ func extract_digit() int64 {
func next_term(k int64) {
// TODO(eds) If big.Int ever gets a Scale method, y2 and bigk could be int64
- y2.New(k*2 + 1)
- bigk.New(k)
+ y2.SetInt64(k*2 + 1)
+ bigk.SetInt64(k)
tmp1.Lsh(numer, 1)
accum.Add(accum, tmp1)