commit | 5d5889c4d98e77997270ee6fa73fd02e1372573f | [log] [tgz] |
---|---|---|
author | Adam Langley <agl@golang.org> | Sun Aug 30 09:21:35 2015 -0700 |
committer | Adam Langley <agl@golang.org> | Wed Sep 30 00:39:00 2015 +0000 |
tree | 85649272d56f9faa285853ab3578af5d3aa87d51 | |
parent | be16001187f17e9c312e69c353be743cc7d9e260 [diff] |
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>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.