public static double logpdf(double val,double rate){
  if (val < 0.) {
    return Double.NEGATIVE_INFINITY;
  }
  return Math.log(rate) - rate * val;
}

public static double logpdf ( double val , double rate ) { if ( val < 0. ) { return Double . NEGATIVE_INFINITY ; } return Math . log ( rate ) - rate * val ; }
log pdf , static version
