docs: public static double quantile(double val, double loc, double scale, double shape1, double shape2) {
      if(!(val >= 0.) || !(val <= 1.)) {
        return Double.NaN;
      }
      if(val == 0.) {
        if(shape2 <= 0.) {
          return shape1 < 0. ? loc + scale / shape1 : Double.NEGATIVE_INFINITY;
        }
        else {
          return loc + (shape1 != 0. //
              ? scale / shape1 * (1. - FastMath.pow(shape2, -shape1)) //
              : scale * FastMath.log(shape2));
        }
      }
      if(val == 1.) {
        return shape1 <= 0. ? Double.NEGATIVE_INFINITY : loc + scale / shape1;
      }
      val = -FastMath.log(val);
      if(shape2 != 0.) {
        val = (1 - FastMath.exp(-shape2 * val)) / shape2;
      }
      val = -FastMath.log(val);
      if(shape1 != 0.) {
        val = (1 - FastMath.exp(-shape1 * val)) / shape1;
      }
      return loc + scale * val;
    }