Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
compute the greatest common divisor using euclid's algorithm
JavaScript
Tree: 4ee600aad5

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
test
LICENSE
index.js
package.json
readme.markdown

readme.markdown

gcd

Compute the greatest common divisor using Euclid's algorithm.

example

var gcd = require('gcd');
var n = gcd(121,44);
console.log(n);

11

methods

var gcd = require('gcd')

gcd(a, b)

Return the greatest common divisor of the integers a and b using Euclid's algorithm.

install

With npm do:

npm install gcd

license

MIT

Something went wrong with that request. Please try again.