Examples of doub()


Examples of com.nr.ran.Ran.doub()

    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));
      }
View Full Code Here

Examples of com.nr.ran.Ran.doub()

    Lognormaldist normc = new Lognormaldist(m,s);
    Ran myran = new Ran(17);
    sbeps=5.0e-14;
    localflag=false;
    for (i=0;i<1000;i++) {
      u=3.0*myran.doub();
      a=normc.cdf(u);
      b=normc.invcdf(a);
//      if (abs(u-b) > sbeps) {
//        System.out.printf(setprecision(15) << u << " %f\n", b << " %f\n", abs(u-b));
//      }
View Full Code Here

Examples of com.nr.ran.Ran.doub()

    Cauchydist normc=new Cauchydist(m,s);
    Ran myran = new Ran(17);
    sbeps=1.0e-14;
    localflag=false;
    for (i=0;i<1000;i++) {
      u=m-3.0*s+6.0*s*myran.doub();
      a=normc.cdf(u);
      b=normc.invcdf(a);
//      System.out.printf(setprecision(15) << u << " %f\n", b << " %f\n", abs(u-b));
      localflag = localflag || abs(u-b) > sbeps;
    }
View Full Code Here

Examples of com.nr.ran.Ran.doub()

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

    Ran myran = new Ran(17);
   
    for (i=0;i<N;i++) {
      x=10.0*myran.doub();
      y=10.0*myran.doub();
      z=10.0*myran.doub();

      f1[i]=rf(x,y,z);
      lambda=sqrt(x*y)+sqrt(x*z)+sqrt(y*z);
 
View Full Code Here

Examples of com.nr.ran.Ran.doub()

    Ran myran = new Ran(17);
   
    for (i=0;i<N;i++) {
      x=10.0*myran.doub();
      y=10.0*myran.doub();
      z=10.0*myran.doub();

      f1[i]=rf(x,y,z);
      lambda=sqrt(x*y)+sqrt(x*z)+sqrt(y*z);
      f2[i]=2.0*rf(x+lambda,y+lambda,z+lambda);
 
View Full Code Here

Examples of com.nr.ran.Ran.doub()

    Ran myran = new Ran(17);
   
    for (i=0;i<N;i++) {
      x=10.0*myran.doub();
      y=10.0*myran.doub();
      z=10.0*myran.doub();

      f1[i]=rf(x,y,z);
      lambda=sqrt(x*y)+sqrt(x*z)+sqrt(y*z);
      f2[i]=2.0*rf(x+lambda,y+lambda,z+lambda);
      f3[i]=rf((x+lambda)/4.0,(y+lambda)/4.0,(z+lambda)/4.0);
View Full Code Here

Examples of com.nr.ran.Ran.doub()

     
    }

    // Test rf(x,x,x) = 1/sqrt(x)
    for (i=0;i<N;i++) {
      x=myran.doub();
      f1[i]=rf(x,x,x);
      f2[i]=1.0/sqrt(x);
    }

    System.out.printf("rf: Rule 3: maximum discrepancy = %f\n", maxel(vecsub(f1,f2)));
View Full Code Here

Examples of com.nr.ran.Ran.doub()

     
    }

    // Symmetry test
    for (i=0;i<N;i++) {
      x=10.0*myran.doub();
      y=10.0*myran.doub();
      z=10.0*myran.doub();

      f1[i]=rf(x,y,z);
      f2[i]=rf(y,x,z);
View Full Code Here

Examples of com.nr.ran.Ran.doub()

    }

    // Symmetry test
    for (i=0;i<N;i++) {
      x=10.0*myran.doub();
      y=10.0*myran.doub();
      z=10.0*myran.doub();

      f1[i]=rf(x,y,z);
      f2[i]=rf(y,x,z);
      f3[i]=rf(x,z,y);
View Full Code Here

Examples of com.nr.ran.Ran.doub()

    // Symmetry test
    for (i=0;i<N;i++) {
      x=10.0*myran.doub();
      y=10.0*myran.doub();
      z=10.0*myran.doub();

      f1[i]=rf(x,y,z);
      f2[i]=rf(y,x,z);
      f3[i]=rf(x,z,y);
    }
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.