Test the number given for primality.
isPrime(n)
n | n |
---|
boolean TRUE if n
is prime, FALSE if not
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.
Other algebra:
bilinear()
,
cubicspline()
,
division
,
fibonacci()
,
horner()
,
linterp()
,
nthroot()
,
polyinterp()
,
pwiselinterp()
,
quadratic()
isPrime(37)
#> [1] TRUE
isPrime(89)
#> [1] TRUE
isPrime(100)
#> [1] FALSE