public static double dchisq(double x){
  if (x == 0.0)   return Double.POSITIVE_INFINITY;
  double xh=Math.sqrt(x);
  return dnorm(xh) / xh;
}

public static double dchisq ( double x ) { if ( x == 0.0 ) return Double . POSITIVE_INFINITY ; double xh = Math . sqrt ( x ) ; return dnorm ( xh ) / xh ; }
returns the density of the chi - squared distribution .
