polynomial.js
function gcd(a, b) {
    var t;
    while (b) {
      t = a;
      a = b;
      b = t % b;
    }
    return Math.abs(a);
  }
function gcd(a, b) {
    var t;
    while (b) {
      t = a;
      a = b;
      b = t % b;
    }
    return Math.abs(a);
  }
function gcd ( a , b ) { var t ; while ( b ) { t = a ; a = b ; b = t % b ; } return Math . abs ( a ) ; }
Calculates the gcd

@param {number} a
@param {number} b
@returns {number}
Calculates the gcd