is.pseudoprime: Check an integer for pseudo-primality to an arbitrary...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

A number is pseudo-prime if it is probably prime, the basis of which is the probabilistic Fermat test; if it passes two such tests, the chances are better than 3 out of 4 that n is prime.

Usage

1
  is.pseudoprime(n, times)

Arguments

n

the integer to test for pseudoprimality.

times

the number of Fermat tests to perform

Details

This is an example function for making R packages and R documentation with roxygen2 and roxygenize.

Value

Whether the number is pseudoprime

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

Abelson, Hal; Jerry Sussman, and Julie Sussman. Structure and Interpretation of Computer Programs. Cambridge: MIT Press, 1984.

See Also

fermat.test

Examples

1
is.pseudoprime(13, 4)# TRUE most of the time


Search within the modiscloud package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.