tests/cuda2.2/tests/MonteCarloMultiGPU/MonteCarlo_gold.cpp
double CND(double d){
    double
        K = 1.0 / (1.0 + 0.2316419 * fabs(d));

    double
        cnd = RSQRT2PI * exp(- 0.5 * d * d) * 
        (K * (A1 + K * (A2 + K * (A3 + K * (A4 + K * A5)))));

    if(d > 0)
        cnd = 1.0 - cnd;

    return cnd;
}
//Polynomial approxiamtion of
//cumulative normal distribution function
Polynomial approxiamtion of
cumulative normal distribution function
Polynomial approxiamtion of cumulative normal distribution function
double CND(double d){
    double
        K = 1.0 / (1.0 + 0.2316419 * fabs(d));
    double
        cnd = RSQRT2PI * exp(- 0.5 * d * d) * 
        (K * (A1 + K * (A2 + K * (A3 + K * (A4 + K * A5)))));
    if(d > 0)
        cnd = 1.0 - cnd;
    return cnd;
}
double CND ( double d ) { double K = 1.0 / ( 1.0 + 0.2316419 * fabs ( d ) ) ; double cnd = RSQRT2PI * exp ( - 0.5 * d * d ) * ( K * ( A1 + K * ( A2 + K * ( A3 + K * ( A4 + K * A5 ) ) ) ) ) ; if ( d > 0 ) cnd = 1.0 - cnd ; return cnd ; }
Polynomial approxiamtion of
cumulative normal distribution function
Polynomial approxiamtion of cumulative normal distribution function