docs: function gammaBest(a, s) {
        var t, b;
  
        t = 0.07 + 0.75 * Math.sqrt(1 - a);
        b = 1 + Math.exp(-t) * a / t;
  
        return function() {
           var x, y, u1, u2, v;
  
           /* eslint-disable no-constant-condition */
           while (true) {
           /* eslint-enable */
              u1 = rgen.random();
              u2 = rgen.random();
              v = b * u1;
              if (v <= 1) {
                 x = t * Math.pow(v, 1 / a);
                 if (u2 <= (2 - x) / (2 + x) || u2 <= Math.exp(-x)) {
                    return x * s;
                 }
              } else {
                 x = -Math.log(t * (b - v) / a);
                 y = x / t;
                 if (u2 * (a + y * (1 - a)) <= 1 ||
                     u2 <= Math.pow(y, a - 1)) {
                    return x * s;
                 }
              }
           }
        };
     }