question: public static double pdf ( double x , double shape , double scale , double factor ) { if ( x <= 0 ) return 0.0 ; final double a = Math . exp ( shape * Math . log ( scale ) - ( shape + 1 ) * Math . log ( x ) - ( scale / x ) - GammaFunction . lnGamma ( shape ) ) ; return factor * a ; }
target:  probability density function of the Gamma distribution