Commit 638ef079 authored by Robert Griesemer's avatar Robert Griesemer

bignum: deprecate by moving into exp directory

R=rsc
CC=golang-dev
https://golang.org/cl/1211047
parent e3bfeec4
......@@ -23,7 +23,6 @@ DIRS=\
archive/tar\
asn1\
big\
bignum\
bufio\
bytes\
cmath\
......@@ -64,6 +63,7 @@ DIRS=\
encoding/hex\
encoding/pem\
exec\
exp/bignum\
exp/datafmt\
exp/draw\
exp/eval\
......
......@@ -2,13 +2,13 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
include ../../Make.$(GOARCH)
include ../../../Make.$(GOARCH)
TARG=bignum
TARG=exp/bignum
GOFILES=\
arith.go\
bignum.go\
integer.go\
rational.go\
include ../../Make.pkg
include ../../../Make.pkg
......@@ -331,6 +331,16 @@ func TestNatDiv(t *testing.T) {
for i := uint(0); i < n; i++ {
nat_eq(100+i, p.Div(MulRange(1, i)), MulRange(i+1, n))
}
// a specific test case that exposed a bug in package big
test_msg = "NatDivC"
x := natFromString("69720375229712477164533808935312303556800", 10, nil)
y := natFromString("3099044504245996706400", 10, nil)
q := natFromString("22497377864108980962", 10, nil)
r := natFromString("0", 10, nil)
qc, rc := x.DivMod(y)
nat_eq(0, q, qc)
nat_eq(1, r, rc)
}
......
......@@ -5,7 +5,7 @@
package eval
import (
"bignum"
"exp/bignum"
"flag"
"fmt"
"log"
......
......@@ -5,7 +5,7 @@
package eval
import (
"bignum"
"exp/bignum"
"fmt"
"go/ast"
"go/token"
......
......@@ -4,7 +4,7 @@
package eval
import (
"bignum"
"exp/bignum"
"log"
)
......
......@@ -5,7 +5,7 @@
package eval
import (
"bignum"
"exp/bignum"
"testing"
)
......
......@@ -5,7 +5,7 @@
package eval
import (
"bignum"
"exp/bignum"
"log"
"go/ast"
"go/token"
......
......@@ -5,7 +5,7 @@
package eval
import (
"bignum"
"exp/bignum"
"go/ast"
"go/token"
"log"
......
......@@ -5,7 +5,7 @@
package eval
import (
"bignum"
"exp/bignum"
)
// TODO(austin): Maybe add to bignum in more general form
......
......@@ -5,7 +5,7 @@
package eval
import (
"bignum"
"exp/bignum"
"fmt"
)
......
......@@ -10,7 +10,7 @@
package main
import Big "bignum"
import Big "exp/bignum"
import Fmt "fmt"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment