1/*[clinic input]
2preserve
3[clinic start generated code]*/
4
5PyDoc_STRVAR(_statistics__normal_dist_inv_cdf__doc__,
6"_normal_dist_inv_cdf($module, p, mu, sigma, /)\n"
7"--\n"
8"\n");
9
10#define _STATISTICS__NORMAL_DIST_INV_CDF_METHODDEF    \
11    {"_normal_dist_inv_cdf", _PyCFunction_CAST(_statistics__normal_dist_inv_cdf), METH_FASTCALL, _statistics__normal_dist_inv_cdf__doc__},
12
13static double
14_statistics__normal_dist_inv_cdf_impl(PyObject *module, double p, double mu,
15                                      double sigma);
16
17static PyObject *
18_statistics__normal_dist_inv_cdf(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
19{
20    PyObject *return_value = NULL;
21    double p;
22    double mu;
23    double sigma;
24    double _return_value;
25
26    if (!_PyArg_CheckPositional("_normal_dist_inv_cdf", nargs, 3, 3)) {
27        goto exit;
28    }
29    if (PyFloat_CheckExact(args[0])) {
30        p = PyFloat_AS_DOUBLE(args[0]);
31    }
32    else
33    {
34        p = PyFloat_AsDouble(args[0]);
35        if (p == -1.0 && PyErr_Occurred()) {
36            goto exit;
37        }
38    }
39    if (PyFloat_CheckExact(args[1])) {
40        mu = PyFloat_AS_DOUBLE(args[1]);
41    }
42    else
43    {
44        mu = PyFloat_AsDouble(args[1]);
45        if (mu == -1.0 && PyErr_Occurred()) {
46            goto exit;
47        }
48    }
49    if (PyFloat_CheckExact(args[2])) {
50        sigma = PyFloat_AS_DOUBLE(args[2]);
51    }
52    else
53    {
54        sigma = PyFloat_AsDouble(args[2]);
55        if (sigma == -1.0 && PyErr_Occurred()) {
56            goto exit;
57        }
58    }
59    _return_value = _statistics__normal_dist_inv_cdf_impl(module, p, mu, sigma);
60    if ((_return_value == -1.0) && PyErr_Occurred()) {
61        goto exit;
62    }
63    return_value = PyFloat_FromDouble(_return_value);
64
65exit:
66    return return_value;
67}
68/*[clinic end generated code: output=b807a8243e7801e6 input=a9049054013a1b77]*/
69