docs: function dnbinom(size, prob, logp) {
        logp = logp === true;
  
        if (utils.hasNaN(prob, size) || prob <= 0 || prob > 1 || size < 0) {
          return function(x) { return NaN; };
        }
  
        return function(x) {
           var p, ans;
  
           if (utils.hasNaN(x)) { return NaN; }
           if (x < 0 || x !== Math.floor(x) ||
               utils.isInfinite(x)) {
              return logp ? -Infinity : 0;
           }
           if (x === 0 && size === 0) { return logp ? 0 : 1; }
           if (utils.isInfinite(size)) { size = Number.MAX_VALUE; }
  
           ans = dbinomLog(x + size, prob)(size);
           p = size / (size + x);
  
           return logp ? Math.log(p) + ans : p * Math.exp(ans);
        };
     }