code: function bfrac(a, b, x, y) {
        var lambda;
  
        lambda = a - (a + b) * x;
        return brcomp(a, b, x, y) + Math.log(contFrac(
           function(i) { // betas from DiDonato
              var n;
  
              n = i - 1;
              return i === 0 ? 0
                             : n + n * (b - n) * x / (a + 2 * n - 1) +
                               (a + n) / (a + 2 * n + 1) *
                                  (lambda + 1 + n * (1 + y));
           },
           function(i) { // alphas from DiDonato
              var n;
  
              n = i - 1;
              return i === 1 ? 1
                             : (a + n - 1) * (a + b + n - 1) /
                               (a + 2 * n - 1) / (a + 2 * n - 1) *
                               n * (b - n) * x * x;
           }
        ));
     }
docs: bfrac (equation 10, DiDonato) calculating in log space