]> gitweb.factorcode.org Git - factor.git/blob - basis/math/primes/miller-rabin/miller-rabin-docs.factor
7a35f041cb712bf845035e0ba353dd1a39025732
[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 sequences math ;
4 IN: math.primes.miller-rabin
5
6 HELP: miller-rabin
7 { $values
8     { "n" integer }
9     { "?" boolean }
10 }
11 { $description "Returns true if the number is a prime. Calls " { $link miller-rabin* } " with a default of 10 Miller-Rabin tests." } ;
12
13 { miller-rabin miller-rabin* } related-words
14
15 HELP: miller-rabin*
16 { $values
17     { "n" integer } { "numtrials" integer }
18     { "?" boolean }
19 }
20 { $description "Performs " { $snippet "numtrials" } " trials of the Miller-Rabin probabilistic primality test algorithm and returns true if prime." } ;
21
22 ARTICLE: "math.primes.miller-rabin" "Miller-Rabin probabilistic primality test"
23 "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
24 "The Miller-Rabin probabilistic primality test:"
25 { $subsections
26     miller-rabin
27     miller-rabin*
28 } ;
29
30 ABOUT: "math.primes.miller-rabin"