isPrime: Test for Primality

Description Usage Arguments Details Value See Also Examples

Description

Test the number given for primality.

Usage

1

Arguments

n

n

Details

This function tests n if it is prime through repeated division attempts. If a match is found, by finding a remainder of 0, FALSE is returned.

Value

boolean TRUE if n is prime, FALSE if not

See Also

Other algebra: bilinear, cubicspline, division, fibonacci, horner, linterp, nthroot, polyinterp, pwiselinterp, quadratic

Examples

1
2
3
isPrime(37)
isPrime(89)
isPrime(100)


Search within the cmna 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.