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.

Readme

Keywords

Package Sidebar

Install

npm i fermat

Weekly Downloads

1

Version

3.0.0

License

MIT

Unpacked Size

3.24 kB

Total Files

4

Last publish

Collaborators

  • kenan