@Description("Normal cdf given a mean, standard deviation, and value")
    @ScalarFunction
    @SqlType(StandardTypes.DOUBLE)
    public static double normalCdf(
            @SqlType(StandardTypes.DOUBLE) double mean,
            @SqlType(StandardTypes.DOUBLE) double standardDeviation,
            @SqlType(StandardTypes.DOUBLE) double value)
    {
        checkCondition(standardDeviation > 0, INVALID_FUNCTION_ARGUMENT, "normalCdf Function: standardDeviation must be > 0");
        return 0.5 * (1 + Erf.erf((value - mean) / (standardDeviation * Math.sqrt(2))));
    }
@Test
    public void testNormalCdf()
    {
        assertFunction("normal_cdf(0, 1, 1.96)", DOUBLE, 0.9750021048517796);
        assertFunction("normal_cdf(10, 9, 10)", DOUBLE, 0.5);
        assertFunction("normal_cdf(-1.5, 2.1, -7.8)", DOUBLE, 0.0013498980316301035);
        assertFunction("normal_cdf(0, 1, infinity())", DOUBLE, 1.0);
        assertFunction("normal_cdf(0, 1, -infinity())", DOUBLE, 0.0);
        assertFunction("normal_cdf(infinity(), 1, 0)", DOUBLE, 0.0);
        assertFunction("normal_cdf(-infinity(), 1, 0)", DOUBLE, 1.0);
        assertFunction("normal_cdf(0, infinity(), 0)", DOUBLE, 0.5);
        assertFunction("normal_cdf(nan(), 1, 0)", DOUBLE, Double.NaN);
        assertFunction("normal_cdf(0, 1, nan())", DOUBLE, Double.NaN);

        assertInvalidFunction("normal_cdf(0, 0, 0.1985)", "normalCdf Function: standardDeviation must be > 0");
        assertInvalidFunction("normal_cdf(0, nan(), 0.1985)", "normalCdf Function: standardDeviation must be > 0");
    }