diff options
author | Russ Cox <rsc@golang.org> | 2010-01-05 16:49:05 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-01-05 16:49:05 -0800 |
commit | 0e7eabf48cdca135bfb6d609d00b9f1ff17a5315 (patch) | |
tree | 777010d0d25b13bc3e57b5dcfc4195d43886400a /src/pkg/big/int.go | |
parent | 8bd71d7f1cf417bab5634e8449dc74d98e2c1eb5 (diff) | |
download | golang-0e7eabf48cdca135bfb6d609d00b9f1ff17a5315.tar.gz |
big: fix ProbablyPrime bug, comments
(changes adopted from alc, agl)
R=agl1, agl
CC=golang-dev
http://codereview.appspot.com/181137
Diffstat (limited to 'src/pkg/big/int.go')
-rw-r--r-- | src/pkg/big/int.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/big/int.go b/src/pkg/big/int.go index 5a0f7c0df..b48954ef8 100644 --- a/src/pkg/big/int.go +++ b/src/pkg/big/int.go @@ -356,7 +356,7 @@ func GcdInt(d, x, y, a, b *Int) { // ProbablyPrime performs n Miller-Rabin tests to check whether z is prime. // If it returns true, z is prime with probability 1 - 1/4^n. // If it returns false, z is not prime. -func ProbablyPrime(z *Int, reps int) bool { return !z.neg && probablyPrime(z.abs, reps) } +func ProbablyPrime(z *Int, n int) bool { return !z.neg && probablyPrime(z.abs, n) } // Rsh sets z = x >> s and returns z. |