@Description("Inverse of normal cdf given a mean, std, and probability")
    @ScalarFunction
    @SqlType(StandardTypes.DOUBLE)
    public static double inverseNormalCdf(@SqlType(StandardTypes.DOUBLE) double mean, @SqlType(StandardTypes.DOUBLE) double sd, @SqlType(StandardTypes.DOUBLE) double p)
    {
        checkCondition(p > 0 && p < 1, INVALID_FUNCTION_ARGUMENT, "inverseNormalCdf Function: p must be 0 > p > 1");
        checkCondition(sd > 0, INVALID_FUNCTION_ARGUMENT, "inverseNormalCdf Function: sd must be > 0");

        return mean + sd * 1.4142135623730951 * Erf.erfInv(2 * p - 1);
    }
@Test
    public void testInverseNormalCdf()
    {
        assertFunction("inverse_normal_cdf(0, 1, 0.3)", DOUBLE, -0.52440051270804089);
        assertFunction("inverse_normal_cdf(10, 9, 0.9)", DOUBLE, 21.533964089901406);
        assertFunction("inverse_normal_cdf(0.5, 0.25, 0.65)", DOUBLE, 0.59633011660189195);
        assertInvalidFunction("inverse_normal_cdf(4, 48, 0)", "inverseNormalCdf Function: p must be 0 > p > 1");
        assertInvalidFunction("inverse_normal_cdf(4, 48, 1)", "inverseNormalCdf Function: p must be 0 > p > 1");
        assertInvalidFunction("inverse_normal_cdf(4, 0, 0.4)", "inverseNormalCdf Function: sd must be > 0");
    }