function errorEstimate(infNorm, q, j) {
    var qfac = 1;

    for (var i = 2; i <= q; i++) {
      qfac *= i;
    }

    var twoqfac = qfac;

    for (var _i2 = q + 1; _i2 <= 2 * q; _i2++) {
      twoqfac *= _i2;
    }

    var twoqp1fac = twoqfac * (2 * q + 1);
    return 8.0 * Math.pow(infNorm / Math.pow(2, j), 2 * q) * qfac * qfac / (twoqfac * twoqp1fac);
  }
Returns the estimated error of the Pade approximant for the given
parameters.