fermat

3.0.0 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    0
    • latest

Version History

Package Sidebar

Install

npm i fermat

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

3.24 kB

Total Files

4

Last publish

Collaborators

  • kenan