Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 | is.pseudoprime(n, times)
|
n |
the integer to test for pseudoprimality. |
times |
the number of Fermat tests to perform |
This is an example function for making R packages and R
documentation with
roxygen2
and
roxygenize
.
Whether the number is pseudoprime
Nicholas J. Matzke matzke@berkeley.edu
Abelson, Hal; Jerry Sussman, and Julie Sussman. Structure and Interpretation of Computer Programs. Cambridge: MIT Press, 1984.
1 | is.pseudoprime(13, 4)# TRUE most of the time
|
Loading required package: date
Loading required package: sp
Loading required package: sfsmisc
Loading required package: raster
Loading required package: rgdal
rgdal: version: 1.5-18, (SVN revision 1082)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.0.4, released 2020/01/28
Path to GDAL shared files: /usr/share/gdal
GDAL binary built with GEOS: TRUE
Loaded PROJ runtime: Rel. 6.3.1, February 10th, 2020, [PJ_VERSION: 631]
Path to PROJ shared files: /usr/share/proj
Linking to sp version:1.4-4
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.