aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/binary/binary.go
diff options
context:
space:
mode:
authorAdam Langley <agl@golang.org>2015-08-30 09:21:35 -0700
committerAdam Langley <agl@golang.org>2015-09-30 00:39:00 +0000
commit5d5889c4d98e77997270ee6fa73fd02e1372573f (patch)
tree85649272d56f9faa285853ab3578af5d3aa87d51 /src/encoding/binary/binary.go
parentbe16001187f17e9c312e69c353be743cc7d9e260 (diff)
downloadgo-5d5889c4d98e77997270ee6fa73fd02e1372573f.tar.xz
math/big: correct documentation for ProbablyPrime.
As akalin points out in the bug, the comment previously claimed that the probability that the input is prime given that the function returned true is 1 - ¼ⁿ. But that's wrong: the correct statement is that the probability of the function returning false given a composite input is 1 - ¼ⁿ. This is not nearly as helpful, but at least it's truthful. A number of other (correct) expressions are suggested on the bug, but I think that the simplier one is preferable. This change also notes that the function is not suitable for adversarial inputs since it's deterministic. Fixes #12274. Change-Id: I6a0871d103b126ee5a5a922a8c6993055cb7b1ed Reviewed-on: https://go-review.googlesource.com/14052 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/encoding/binary/binary.go')
0 files changed, 0 insertions, 0 deletions