bignum: deprecate by moving into exp directory

R=rsc
CC=golang-dev
https://golang.org/cl/1211047
This commit is contained in:
Robert Griesemer 2010-05-21 14:14:22 -07:00
parent e3bfeec474
commit 638ef0794f
18 changed files with 23 additions and 13 deletions

View File

@ -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=\
encoding/hex\ encoding/hex\
encoding/pem\ encoding/pem\
exec\ exec\
exp/bignum\
exp/datafmt\ exp/datafmt\
exp/draw\ exp/draw\
exp/eval\ exp/eval\

View File

@ -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

View File

@ -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)
} }

View File

@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"flag" "flag"
"fmt" "fmt"
"log" "log"

View File

@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"fmt" "fmt"
"go/ast" "go/ast"
"go/token" "go/token"

View File

@ -4,7 +4,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"log" "log"
) )

View File

@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"testing" "testing"
) )

View File

@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"log" "log"
"go/ast" "go/ast"
"go/token" "go/token"

View File

@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"go/ast" "go/ast"
"go/token" "go/token"
"log" "log"

View File

@ -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

View File

@ -5,7 +5,7 @@
package eval package eval
import ( import (
"bignum" "exp/bignum"
"fmt" "fmt"
) )

View File

@ -10,7 +10,7 @@
package main package main
import Big "bignum" import Big "exp/bignum"
import Fmt "fmt" import Fmt "fmt"