docs: function pgamma(a, s, lowerTail, logp) {
        var f;
  
        logp = logp === true;
        lowerTail = lowerTail !== false;
        f = lowerTail ? gratio.gratio(a) : gratio.gratioc(a);
  
        if (s <= 0 || a < 0 || utils.hasNaN(a, s)) {
           return function(x) { return NaN; };
        }
  
        return function(x) {
           x /= s;
           if (utils.hasNaN(x)) { return NaN; }
           if (a === 0) {
              return utils.adjustLower(x <= 0 ? 0 : 1, lowerTail, logp);
           }
           if (x <= 0) { return utils.adjustLower(0, lowerTail, logp); }
           if (x === Infinity) { return utils.adjustLower(1, lowerTail, logp); }
  
           return utils.adjustLower(f(x), true, logp);
        };
     }