Package org.jquantlib.math.distributions

Examples of org.jquantlib.math.distributions.BivariateNormalDistribution.op()


      final double tolerance = 1.0e-15;
      for (final double element : rho) {
          for (Integer sgn=-1; sgn < 2; sgn+=2) {
              final BivariateNormalDistribution bvn= new BivariateNormalDistribution(sgn*element);
              final double expected = 0.25 + Math.asin(sgn*element) / (2*Math.PI) ;
              final double realised = bvn.op(x,y);

              if (Math.abs(realised-expected)>=tolerance)
                fail(" bivariate cumulative distribution\n"
                            + "    rho: " + sgn*element + "\n"
                            + "    expected:  " + expected + "\n"
View Full Code Here


        final double b = values[i][1];
        final double rho = values[i][2];
        final double result = values[i][3];

          final BivariateNormalDistribution bcd = new BivariateNormalDistribution(rho);
          final double value = bcd.op(a, b);

          final double tolerance = 1.0e-6;
          if (Math.abs(value-result) >= tolerance)
            fail(" bivariate cumulative distribution\n"
                      + "    case: " + i+1 + "\n"
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.