3.0.0 • Published 8 months ago
fermat v3.0.0
fermat
Fermat's probabilistic primality test.
Example
const fermat = require('fermat');
fermat(7);
// => true
fermat(561);
// => true (not actually prime though)
Installation
$ npm install fermat
API
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.