static double mypdf(double value,double shape,double scale){
  return Math.exp((shape - 1) * Math.log(value) - value / scale - GammaFunction.logGamma(shape) - shape * Math.log(scale));
}

static double mypdf ( double value , double shape , double scale ) { return Math . exp ( ( shape - 1 ) * Math . log ( value ) - value / scale - GammaFunction . logGamma ( shape ) - shape * Math . log ( scale ) ) ; }
this test stochastically draws gamma variates and compares the coded pdf with the actual pdf . the tolerance is required to be at most 1e - 10 .
