docs: function pbinom(size, p, lowerTail, logp) {
        var goodParams;
  
        logp = logp === true;
        lowerTail = lowerTail !== false;
  
        goodParams = size >= 0 && size < Infinity && size === Math.floor(size) &&
                     p >= 0 && p <= 1;
        if (!goodParams) { return function(x) { return NaN; }; }
        return function(x) {
           var res;
  
           if (isNaN(x)) { return NaN; }
           res = lowerTail === x < 0 ? -Infinity : 0;
           x = Math.floor(x);
           if (x >= 0 && x < size) {
              res = pbeta(x + 1, size - x, !lowerTail, true)(p);
           }
  
           return logp ? res : Math.exp(res);
        };
     }