docs: function qrPolynomial(num, shift) {
  
  		if (typeof num.length == 'undefined') {
  			throw new Error(num.length + '/' + shift);
  		}
  
  		var _num = function() {
  			var offset = 0;
  			while (offset < num.length && num[offset] == 0) {
  				offset += 1;
  			}
  			var _num = new Array(num.length - offset + shift);
  			for (var i = 0; i < num.length - offset; i += 1) {
  				_num[i] = num[i + offset];
  			}
  			return _num;
  		}();
  
  		var _this = {};
  
  		_this.getAt = function(index) {
  			return _num[index];
  		};
  
  		_this.getLength = function() {
  			return _num.length;
  		};
  
  		_this.multiply = function(e) {
  
  			var num = new Array(_this.getLength() + e.getLength() - 1);
  
  			for (var i = 0; i < _this.getLength(); i += 1) {
  				for (var j = 0; j < e.getLength(); j += 1) {
  					num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i) ) + QRMath.glog(e.getAt(j) ) );
  				}
  			}
  
  			return qrPolynomial(num, 0);
  		};
  
  		_this.mod = function(e) {
  
  			if (_this.getLength() - e.getLength() < 0) {
  				return _this;
  			}
  
  			var ratio = QRMath.glog(_this.getAt(0) ) - QRMath.glog(e.getAt(0) );
  
  			var num = new Array(_this.getLength() );
  			for (var i = 0; i < _this.getLength(); i += 1) {
  				num[i] = _this.getAt(i);
  			}
  
  			for (var i = 0; i < e.getLength(); i += 1) {
  				num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i) ) + ratio);
  			}
  
  			// recursive call
  			return qrPolynomial(num, 0).mod(e);
  		};
  
  		return _this;
  	}