docs: public static double logpdf(double val, double alpha, double beta) {
      return (alpha <= 0. || beta <= 0. || Double.isNaN(alpha) || Double.isNaN(beta) || Double.isNaN(val)) ? Double.NaN : //
          (val < 0. || val > 1.) ? Double.NEGATIVE_INFINITY : //
              val == 0. ? (alpha > 1. ? Double.NEGATIVE_INFINITY : alpha < 1. ? Double.POSITIVE_INFINITY : FastMath.log(beta)) //
                  : val == 1. ? (beta > 1. ? Double.NEGATIVE_INFINITY : beta < 1. ? Double.POSITIVE_INFINITY : FastMath.log(alpha)) //
                      : -logBeta(alpha, beta) + FastMath.log(val) * (alpha - 1) + FastMath.log1p(-val) * (beta - 1);
    }