code: function pexp(rate, lowerTail, logp) {
        logp = logp === true;
        lowerTail = lowerTail !== false;
  
        if (utils.hasNaN(rate)) { return function(x) { return NaN; }; }
  
        return function(x) {
           var ret;
  
           if (utils.hasNaN(x)) { return NaN; }
           if (rate < 0 && rate !== -Infinity) { return NaN; }
           if (x <= 0) {
              ret = lowerTail ? 0 : 1;
              return logp ? Math.log(ret) : ret;
           }
  
           // basic behavior
           if (lowerTail) {
              return logp ? log1p(-Math.exp(-rate * x))
                          : -expm1(-rate * x);
           }
           // else right tail
           return logp ? -rate * x
                       : Math.exp(-rate * x);
        };
     }
docs: Evaluates the lower-tail cdf at `x` for the exponential distribution:
  $$\textrm{pexp}(\lambda)(x) = 1 - e^{-\lambda x}$$
  
  Expects the rate $\lambda > 0$.
  
  `lowerTail` defaults to `true`; if `lowerTail` is `false`, returns
  the upper tail probability instead.
  
  `logp` defaults to `false`; if `logp` is `true`, returns the logarithm
  of the result.
  @fullName pexp(rate, lowerTail, logp)(x)
  @memberof exponential