]> gitweb.factorcode.org Git - factor.git/blob - basis/math/primes/miller-rabin/miller-rabin-docs.factor
factor: trim using lists
[factor.git] / basis / math / primes / miller-rabin / miller-rabin-docs.factor
1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax kernel math
4 math.primes.miller-rabin ;
5 IN: math.primes.miller-rabin
6
7 HELP: miller-rabin
8 { $values
9     { "n" integer }
10     { "?" boolean }
11 }
12 { $description "Returns true if the number is a prime. Calls " { $link miller-rabin* } " with a default of 10 Miller-Rabin tests." } ;
13
14 { miller-rabin miller-rabin* } related-words
15
16 HELP: miller-rabin*
17 { $values
18     { "n" integer } { "numtrials" integer }
19     { "?" boolean }
20 }
21 { $description "Performs " { $snippet "numtrials" } " trials of the Miller-Rabin probabilistic primality test algorithm and returns true if prime." } ;
22
23 ARTICLE: "math.primes.miller-rabin" "Miller-Rabin probabilistic primality test"
24 "The " { $vocab-link "math.primes.miller-rabin" } " vocabulary implements the Miller-Rabin probabilistic primality test and utility words that use it in order to generate random prime numbers." $nl
25 "The Miller-Rabin probabilistic primality test:"
26 { $subsections
27     miller-rabin
28     miller-rabin*
29 } ;
30
31 ABOUT: "math.primes.miller-rabin"