question: public static double pdf ( double x , double k , double lambda , double theta ) { if ( x <= theta || x == Double . POSITIVE_INFINITY ) { return 0. ; } double xl = ( x - theta ) / lambda ; double p = Math . pow ( xl , k - 1 ) , p2 = p * - xl ; return p2 != Double . NEGATIVE_INFINITY ? k / lambda * p * Math . exp ( p2 ) : 0. ; }
target:  PDF of Weibull distribution