public static double logpdf(double val,int v){
  return GammaDistribution.logGamma((v + 1) * .5) - GammaDistribution.logGamma(v * .5) - .5 * Math.log(v * Math.PI) + Math.log1p(val * val / v) * -.5 * (v + 1);
}

public static double logpdf ( double val , int v ) { return GammaDistribution . logGamma ( ( v + 1 ) * .5 ) - GammaDistribution . logGamma ( v * .5 ) - .5 * Math . log ( v * Math . PI ) + Math . log1p ( val * val / v ) * - .5 * ( v + 1 ) ; }
static version of the t distribution ' s pdf .
