Returns an array of continued fraction elements

Ex: new Fraction("7/8").toContinued() => [0,1,7]
778678
function() {

      var t;
      var a = this['n'];
      var b = this['d'];
      var res = [];

      if (isNaN(this['n']) || isNaN(this['d'])) {
        return res;
      }

      do {
        res.push(Math.floor(a / b));
        t = a % b;
        a = b;
        b = t;
      } while (a !== 1);

      return res;
    }
520061
function() {
    var m = 0, ni = this.elements.length, ki = ni, i, nj, kj = this.elements[0].length, j;
    do { i = ki - ni;
      nj = kj;
      do { j = kj - nj;
        if (Math.abs(this.elements[i][j]) > Math.abs(m)) { m = this.elements[i][j]; }
      } while (--nj);
    } while (--ni);
    return m;
  }
642038
public long[] finalize256() {
    permuteAndUpdate();
    permuteAndUpdate();
    permuteAndUpdate();
    permuteAndUpdate();
    permuteAndUpdate();
    permuteAndUpdate();
    permuteAndUpdate();
    permuteAndUpdate();
    permuteAndUpdate();
    permuteAndUpdate();
    done = true;
    long[] hash = new long[4];
    modularReduction(v1[1] + mul1[1], v1[0] + mul1[0],
                     v0[1] + mul0[1], v0[0] + mul0[0],
                     hash, 0);
    modularReduction(v1[3] + mul1[3], v1[2] + mul1[2],
                     v0[3] + mul0[3], v0[2] + mul0[2],
                     hash, 2);
    return hash;
  }
1326228
function (m, n) {
      n %= 64
      if (n === 32) {
        return [m[1], m[0]]
      } else if (n < 32) {
        return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]
      } else {
        n -= 32
        return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]
      }
    }
1200800
public static long[] getSortedDistinct(long[] values) {
        if (values.length == 0)
            return values;
        Arrays.sort(values);
        int shift = 0;
        int i = 0;
        while (i + shift + 1 < values.length)
            if (values[i + shift] == values[i + shift + 1])
                ++shift;
            else {
                values[i] = values[i + shift];
                ++i;
            }
        values[i] = values[i + shift];
        return Arrays.copyOf(values, i + 1);
    }
263158
public static long[] getLongIndexArray(int length) {
        long[] index = new long[length];
        for (int i=0; i<index.length; i++) {
            index[i] = i;
        }
        return index;
    }
385943
function grad(x) {

  return [
  new Fraction(x[0]).mul(x[0]).add(x[1]),
  new Fraction(2).mul(x[1]).add(x[0])
  ];
}
1025317
private static Long[] castToLong( long[] d )
    {
        Long[] dest = new Long[d.length];
        for ( int i = 0; i < d.length; i++ )
        {
            dest[i] = (long)d[i];
        }
        return dest;
    }
1244564
def next_interval(self, interval):
        
        index = np.where(self.intervals == interval)
        if index[0][0] + 1 < len(self.intervals):
            return self.intervals[index[0][0] + 1]
        else:
            raise IndexError("Ran out of intervals!")
1228592
function getPrimes(limit) {
    var sieve = new Array(limit);
    var n, j, k;
    var last = Math.floor(Math.sqrt(limit));
    for (n=2; n < limit; n++) {
        sieve[n] = true;
    }
    for (n=2; n <= last;) {
        for (j= n+n; j < limit; j += n) {
            sieve[j] = false;
        }
        for (j=1; j < last; j++) {
            k = n+j;
            if (sieve[k]) {
                n = k;
                break;
            }
        }
    }
    var primes = [];
    for (n=2; n < limit; n++) {
        if (sieve[n]) {
            primes.push(n);
        }
    }
    return primes;
}
1018080
function() {
            	var m = 0, i = this.elements.length, nj = this.elements[0].length, j;
            	while (i--) {
            	    j = nj;
            	    while (j--) {
            		if (Math.abs(this.elements[i][j]) > Math.abs(m)) { m = this.elements[i][j]; }
            	    }
            	}
            	return m;
                }
1368585
static String repeat(final String toBeRepeated, final int numTimes) {
        final StringBuilder builder = new StringBuilder();

        for (int i = 0; i < numTimes; i++) {
            builder.append(toBeRepeated);
        }
        return builder.toString();
    }
858686
function(start, end) {
      var current = parseInt(start), end = parseInt(end), values = [current]
      if (end > current) while (++current <= end) values.push(current)
      else               while (--current >= end) values.push(current)
      return '[' + values + ']'
    }
734343
public static long getLongBE(final byte[] array, final int offset) {
    return  ( array[offset + 7] & 0XFFL       )
          | ((array[offset + 6] & 0XFFL) <<  8)
          | ((array[offset + 5] & 0XFFL) << 16)
          | ((array[offset + 4] & 0XFFL) << 24)
          | ((array[offset + 3] & 0XFFL) << 32)
          | ((array[offset + 2] & 0XFFL) << 40)
          | ((array[offset + 1] & 0XFFL) << 48)
          | ((array[offset    ] & 0XFFL) << 56);
  }
851896
function() {
    return [
        utils.generateRandomHex(8),
        utils.generateRandomHex(4),
        utils.generateRandomHex(4),
        utils.generateRandomHex(4),
        utils.generateRandomHex(12)
    ].join('-');
}
78203
private int[] range(int start, int end) {
        if (rangeList == null) {
            rangeList = new int[] { start, end+1, HIGH };
        } else {
            rangeList[0] = start;
            rangeList[1] = end+1;
        }
        return rangeList;
    }
430030
public BigDecimal remainder() {
	    BigDecimal out = toBigDecimal();
		BigDecimal fraction = out.remainder(BigDecimal.ONE);
		return fraction;
	}