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
https://golang.org/cl/1091041
diff --git a/test/bench/pidigits.go b/test/bench/pidigits.go
index a055150..dcfb502 100644
--- a/test/bench/pidigits.go
+++ b/test/bench/pidigits.go
@@ -81,8 +81,8 @@
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)