Opened 9 years ago

Closed 9 years ago

#9645 closed Bugs (fixed)

Minor typo in boost multiprecision primality testing documentation

Reported by: slask@… Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.55.0 Severity: Cosmetic
Keywords: Cc:

Description

The current text on http://www.boost.org/doc/libs/1_55_0/libs/multiprecision/doc/html/boost_multiprecision/tut/primetest.html says: These functions perform a Miller-Rabin test for primality, if the result is false then n is definitely composite, while if the result is true then n is prime with probability 0.25trials.

I believe it should say (1-0.25trials), not 0.25trials.

Change History (2)

comment:1 by anonymous, 9 years ago

The current text is wrong, but your suggestion is, too (you're confusing conditional probability with its inverse, just as the original does). The text should say: "if the result is false then n is definitely composite, while if the result is true then n is probably prime. The probability to declare a composite n as probable prime is at most 0.25trials. Note that this does not allow a statement about the probability of n being actually prime (for that, the prior probability would have to be known)."

comment:2 by John Maddock, 9 years ago

Resolution: fixed
Status: newclosed

Thanks for the comments (and better wording). Fixed in develop.

Note: See TracTickets for help on using tickets.