Examples of pks()


Examples of com.nr.sf.KSdist.pks()

    System.out.println("Testing KSdist");

    // Test special cases
    z=0.0;
    KSdist norm = new KSdist();
    localflag = abs(norm.pks(z)-0.0) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** KSdist: Special case #1 failed for Pks");
     
    }
View Full Code Here

Examples of com.nr.sf.KSdist.pks()

     
    }
   
    z=1.0;
//    System.out.printf(setprecision(17) << norm.pks(z) << " %f\n", 1-2.0*exp(-2.0)+2.0*exp(-8.0)-2.0*exp(-18.0));
    localflag = abs(norm.pks(z)-1+2.0*exp(-2.0)-2.0*exp(-8.0)+2.0*exp(-18.0)) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** KSdist: Special case #2 failed for Pks");
     
    }
View Full Code Here

Examples of com.nr.sf.KSdist.pks()

      fail("*** KSdist: Special case #2 failed for Qks");
     
    }

    z=100.0;
    localflag = abs(norm.pks(z)-1.0) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** KSdist: Special case #3 failed for Pks");
     
    }
View Full Code Here

Examples of com.nr.sf.KSdist.pks()

    }

    // Pks correctly related to Qks
    localflag=false;
    for (i=0;i<N;i++)
      localflag = localflag || 1.0-norm.pks(x[i])-norm.qks(x[i]) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** KSdist: Pks and Qks do not add to 1.0 in all cases");
     
    }
View Full Code Here

Examples of com.nr.sf.KSdist.pks()

    Ran myran = new Ran(17);
    localflag=false;
    sbeps=6.e-10// XXX 5.e-10 not pass
    for (i=0;i<10;i++) {
      z=0.3+3.0*myran.doub();
      a=norm.pks(z);
      b=norm.invpks(a);
//      if (abs(z-b) > sbeps) {
//        System.out.printf(setprecision(15) << z << " %f\n", b << " %f\n", abs(z-b));
//      }
      localflag = localflag || abs(z-b) > sbeps;
View Full Code Here

Examples of com.nr.sf.KSdist.pks()

    }

    // Fingerprint test for Pks
    sbeps=1.e-15;
    for (i=0;i<N;i++) {
      pks[i]=norm.pks(x[i]);
//      System.out.printf(setprecision(17) << pks[i]);
    }
//    System.out.println("KSdist: Maximum discrepancy = %f\n", maxel(vecsub(pks,pksexp)));
    localflag = maxel(vecsub(pks,pksexp)) > sbeps;
    globalflag = globalflag || localflag;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.