docs: function qgamma(a, s, lowerTail, logp) {
        var gaminv;
  
        logp = logp === true;
        lowerTail = lowerTail !== false;
        gaminv = gratio.gaminv(a); // function of p, lowerTail
  
        if (utils.hasNaN(a, s)) { return function() { return NaN; }; }
  
        return utils.qhelper(lowerTail, logp, 0, Infinity, function(p) {
           if (a < 0 || s <= 0) { return NaN; }
           if (utils.isInfinite(a)) { return Infinity; }
           if (a === 0) { return 0; }
  
           return s * gaminv(logp ? Math.exp(p) : p, lowerTail);
        });
     }