Chisqdist normc=new Chisqdist(df);
Ran myran = new Ran(17);
sbeps=2.0e-12; // XXX 1.0e-12 not pass.
localflag=false;
for (i=0;i<1000;i++) {
chisq=df-3.0*sqrt(df)+6.0*sqrt(df)*myran.doub();
a=normc.cdf(chisq);
b=normc.invcdf(a);
if (abs(chisq-b) > sbeps) {
System.out.printf("%f %f %f\n",chisq, b ,abs(chisq-b));
}