3.0.0 • Published 8 months ago

fermat v3.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 months ago

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.

3.0.0

8 months ago

2.0.0

1 year ago

1.0.7

2 years ago

1.0.6

8 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago