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=\ ...@@ -23,7 +23,6 @@ DIRS=\
archive/tar\ archive/tar\
asn1\ asn1\
big\ big\
bignum\
bufio\ bufio\
bytes\ bytes\
cmath\ cmath\
...@@ -64,6 +63,7 @@ DIRS=\ ...@@ -64,6 +63,7 @@ DIRS=\
encoding/hex\ encoding/hex\
encoding/pem\ encoding/pem\
exec\ exec\
exp/bignum\
exp/datafmt\ exp/datafmt\
exp/draw\ exp/draw\
exp/eval\ exp/eval\
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include ../../Make.$(GOARCH) include ../../../Make.$(GOARCH)
TARG=bignum TARG=exp/bignum
GOFILES=\ GOFILES=\
arith.go\ arith.go\
bignum.go\ bignum.go\
integer.go\ integer.go\
rational.go\ rational.go\
include ../../Make.pkg include ../../../Make.pkg
...@@ -331,6 +331,16 @@ func TestNatDiv(t *testing.T) { ...@@ -331,6 +331,16 @@ func TestNatDiv(t *testing.T) {
for i := uint(0); i < n; i++ { for i := uint(0); i < n; i++ {
nat_eq(100+i, p.Div(MulRange(1, i)), MulRange(i+1, n)) 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 @@ ...@@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"flag" "flag"
"fmt" "fmt"
"log" "log"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"fmt" "fmt"
"go/ast" "go/ast"
"go/token" "go/token"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"log" "log"
) )
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"testing" "testing"
) )
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"log" "log"
"go/ast" "go/ast"
"go/token" "go/token"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"go/ast" "go/ast"
"go/token" "go/token"
"log" "log"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
) )
// TODO(austin): Maybe add to bignum in more general form // TODO(austin): Maybe add to bignum in more general form
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"fmt" "fmt"
) )
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
package main package main
import Big "bignum" import Big "exp/bignum"
import Fmt "fmt" 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