| 1 |
/*[clinic input] |
| 2 |
preserve |
| 3 |
[clinic start generated code]*/ |
| 4 |
|
| 5 |
PyDoc_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)(void(*)(void))_statistics__normal_dist_inv_cdf, METH_FASTCALL, _statistics__normal_dist_inv_cdf__doc__}, |
| 12 |
|
| 13 |
static double |
| 14 |
_statistics__normal_dist_inv_cdf_impl(PyObject *module, double p, double mu, |
| 15 |
double sigma); |
| 16 |
|
| 17 |
static 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 (nargs != 3) { |
| 27 |
PyErr_Format(PyExc_TypeError, "_normal_dist_inv_cdf expected 3 arguments, got %zd", nargs); |
| 28 |
goto exit; |
| 29 |
} |
| 30 |
p = PyFloat_AsDouble(args[0]); |
| 31 |
if (p == -1.0 && PyErr_Occurred()) { |
| 32 |
goto exit; |
| 33 |
} |
| 34 |
mu = PyFloat_AsDouble(args[1]); |
| 35 |
if (mu == -1.0 && PyErr_Occurred()) { |
| 36 |
goto exit; |
| 37 |
} |
| 38 |
sigma = PyFloat_AsDouble(args[2]); |
| 39 |
if (sigma == -1.0 && PyErr_Occurred()) { |
| 40 |
goto exit; |
| 41 |
} |
| 42 |
_return_value = _statistics__normal_dist_inv_cdf_impl(module, p, mu, sigma); |
| 43 |
if ((_return_value == -1.0) && PyErr_Occurred()) { |
| 44 |
goto exit; |
| 45 |
} |
| 46 |
return_value = PyFloat_FromDouble(_return_value); |
| 47 |
|
| 48 |
exit: |
| 49 |
return return_value; |
| 50 |
} |
| 51 |
/*[clinic end generated code: output=0f0c849d51f16f1b input=a9049054013a1b77]*/ |