]> Cypherpunks repositories - gostls13.git/commit
big: fix mistakes with probablyPrime
authorAdam Langley <agl@golang.org>
Fri, 5 Mar 2010 20:55:26 +0000 (15:55 -0500)
committerAdam Langley <agl@golang.org>
Fri, 5 Mar 2010 20:55:26 +0000 (15:55 -0500)
commit308064fc5975836596d89d34046947f2e8261eb4
tree76ea2f29a731578f597d19fe384b3dcfa8cd2158
parent0ac5ef70db410a219eeb46fd9c45205df6a3e2f6
big: fix mistakes with probablyPrime

probablyPrime would return false negatives in some cases.

This code has now been tested against GMP for several million iterations without issues.

Fixes #638.

R=rsc
CC=golang-dev
https://golang.org/cl/252041
src/pkg/big/int_test.go
src/pkg/big/nat.go