mirror of
https://github.com/golang/go
synced 2024-10-06 08:00:07 +00:00
Fix incorrect comment variable reference.
w&1 is the parity of 'x', not of 'n'.
This commit is contained in:
parent
55e3aced9e
commit
54ba08ab10
|
@ -51,7 +51,7 @@ func (x *Int) ProbablyPrime(n int) bool {
|
|||
}
|
||||
|
||||
if w&1 == 0 {
|
||||
return false // n is even
|
||||
return false // x is even
|
||||
}
|
||||
|
||||
const primesA = 3 * 5 * 7 * 11 * 13 * 17 * 19 * 23 * 37
|
||||
|
|
Loading…
Reference in a new issue