Package com.nr.sf

Examples of com.nr.sf.Normaldist.cdf()


    m=0.5;s=1.5;
    func_Normaldist dist2 =new func_Normaldist(m,s);
    Normaldist normcdf = new Normaldist(m,s);
    for (i=0;i<N;i++) {
      c[i]=qsimp(dist2,-20.0,x[i]);
      d[i]=normcdf.cdf(x[i]);
//      System.out.printf(c[i]-d[i]);
      localflag = localflag || abs(c[i]-d[i]) > sbeps;
    }
    globalflag = globalflag || localflag;
    if (localflag) {
View Full Code Here


    Normaldist normc = new Normaldist(m,s);
    Ran myran = new Ran(17);
    sbeps=5.0e-14;
    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;
    }
    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.