npm.io
1.0.0 • Published 11 years ago

is-coprime

Licence
MIT
Version
1.0.0
Deps
1
Vulns
0
Weekly
0

is-coprime Build Status

Check if two integers are coprime.

Two integers are said to be relatively prime, mutually prime, or coprime if the only positive integer that evenly divides both of them is 1.

Install

$ npm install --save is-coprime

Usage

var isCoprime = require('is-coprime');

isCoprime(2, 5);
//=> true

isCoprime(12, 21);
//=> false

License

MIT Andreas Gillström

Keywords