public double logPdf(double x){
  recomputeZ();
  if (x < 0 || x > 1) {
    return Double.NEGATIVE_INFINITY;
  }
 else   if (x == 0) {
    if (alpha < 1) {
      return Double.NaN;
    }
    return Double.NEGATIVE_INFINITY;
  }
 else   if (x == 1) {
    if (beta < 1) {
      return Double.NaN;
    }
    return Double.NEGATIVE_INFINITY;
  }
 else {
    double logX=Math.log(x);
    double log1mX=Math.log1p(-x);
    return (alpha - 1) * logX + (beta - 1) * log1mX - z;
  }
}

public double logPdf ( double x ) { recomputeZ ( ) ; if ( x < 0 || x > 1 ) { return Double . NEGATIVE_INFINITY ; } else if ( x == 0 ) { if ( alpha < 1 ) { return Double . NaN ; } return Double . NEGATIVE_INFINITY ; } else if ( x == 1 ) { if ( beta < 1 ) { return Double . NaN ; } return Double . NEGATIVE_INFINITY ; } else { double logX = Math . log ( x ) ; double log1mX = Math . log1p ( - x ) ; return ( alpha - 1 ) * logX + ( beta - 1 ) * log1mX - z ; } }
the natural log of the probability density function of the distribution
