From 0e7eabf48cdca135bfb6d609d00b9f1ff17a5315 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 5 Jan 2010 16:49:05 -0800 Subject: big: fix ProbablyPrime bug, comments (changes adopted from alc, agl) R=agl1, agl CC=golang-dev http://codereview.appspot.com/181137 --- src/pkg/big/int.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pkg/big/int.go') 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. -- cgit v1.2.3