@Override public double op(double z){
  z=(z - average) / sigma;
  double result=0.5 * (1.0 + errorFunction.op(z * Constants.M_SQRT_2));
  if (result <= 1e-8) {
    double sum=1.0;
    final double zsqr=z * z;
    double i=1.0, g=1.0, x, y, a=Constants.QL_MAX_REAL, lasta;
    do {
      lasta=a;
      x=(4.0 * i - 3.0) / zsqr;
      y=x * ((4.0 * i - 1) / zsqr);
      a=g * (x - y);
      sum-=a;
      g*=y;
      ++i;
      a=Math.abs(a);
    }
 while (lasta > a && a >= Math.abs(sum * Constants.QL_EPSILON));
    result=-gaussian.op(z) / z * sum;
  }
  return result;
}

@ Override public double op ( double z ) { z = ( z - average ) / sigma ; double result = 0.5 * ( 1.0 + errorFunction . op ( z * Constants . M_SQRT_2 ) ) ; if ( result <= 1e-8 ) { double sum = 1.0 ; final double zsqr = z * z ; double i = 1.0 , g = 1.0 , x , y , a = Constants . QL_MAX_REAL , lasta ; do { lasta = a ; x = ( 4.0 * i - 3.0 ) / zsqr ; y = x * ( ( 4.0 * i - 1 ) / zsqr ) ; a = g * ( x - y ) ; sum -= a ; g *= y ; ++ i ; a = Math . abs ( a ) ; } while ( lasta > a && a >= Math . abs ( sum * Constants . QL_EPSILON ) ) ; result = - gaussian . op ( z ) / z * sum ; } return result ; }
computes the cumulative normal distribution . < p > asymptotic expansion for very negative z as references on m . abramowitz book .
