Description Usage Arguments Details Value Note Author(s) References
This is an example function for making R packages and R
documentation with
roxygen2
and
roxygenize
.
1 | fermat.test(n)
|
n |
the integer to test for primality |
Fermat's little theorem states that if n is a prime number and a is any positive integer less than n, then a raised to the nth power is congruent to a modulo n.
Whether the integer passes the Fermat test for a randomized 0 < a < n no workyATcallGraphPrimitives
fermat.test
doesn't work for integers above
approximately fifteen because modulus loses precision.
Peter Danenberg pcd@roxygen.org
http://en.wikipedia.org/wiki/Fermat's_little_theorem
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.