fermat
v3.0.0
Published
Fermat's probabilistic primality test
Readme
fermat
Fermat's probabilistic primality test.
Example
const fermat = require('fermat');
fermat(7);
// => true
fermat(561);
// => true (not actually prime though)Installation
$ npm install fermatAPI
const fermat = require('fermat');fermat(n)
Returns true if n is probably prime. Returns false otherwise. n can be
either a Number or a String.
