public static double dchisqLog(double x){
  if (x == 0.0)   return Double.POSITIVE_INFINITY;
  double xh=Math.sqrt(x);
  return dnormLog(xh) - Math.log(xh);
}

public static double dchisqLog ( double x ) { if ( x == 0.0 ) return Double . POSITIVE_INFINITY ; double xh = Math . sqrt ( x ) ; return dnormLog ( xh ) - Math . log ( xh ) ; }
returns the log - density of the noncentral chi - square distribution .
