// Test Erf
System.out.println("Testing Erf");
Erf e = new Erf();
for (i=0;i<N;i++) {
zz1[i]=e.erf(xx[i]);
zz2[i]=e.erfc(xx[i]);
}
sbeps=5.e-15;
System.out.printf("Erf, erf(): Maximum discrepancy = %f\n", maxel(vecsub(zz1,yy1)));
localflag = maxel(vecsub(zz1,yy1)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** Erf, erf(): Incorrect function values");
}
sbeps=5.e-15;
System.out.printf("Erf, erfc(): Maximum discrepancy = %f\n", maxel(vecsub(zz2,yy2)));
localflag = maxel(vecsub(zz2,yy2)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** Erf, erfc(): Incorrect function values");
}
for (i=0;i<N;i++) {
zz3[i]=e.inverf(zz1[i]);
zz4[i]=e.inverfc(zz2[i]);
}
sbeps=1.e-9;
System.out.printf("Erf, inverf(): Maximum discrepancy = %f\n", maxel(vecsub(zz3,xx)));
localflag = maxel(vecsub(zz3,xx)) > sbeps;