code: public static double logBeta(double alpha, double beta) {
      return GammaDistribution.logGamma(alpha) + GammaDistribution.logGamma(beta) - GammaDistribution.logGamma(alpha + beta);
    }
docs: Compute log beta(a,b)
  
  @param alpha Shape parameter a
  @param beta Shape parameter b
  @return Logarithm of result