question: public static double logPdf ( double x , double shape , double scale , double factor ) { if ( x <= 0 ) return Double . NEGATIVE_INFINITY ; return factor + shape * Math . log ( scale ) - ( shape + 1 ) * Math . log ( x ) - ( scale / x ) - GammaFunction . lnGamma ( shape ) ; }
target:  the natural log of the probability density function of the distribution