Dong-hee Na | 0a18ee4 | 2019-08-24 07:20:30 +0900 | [diff] [blame^] | 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 (!_PyArg_CheckPositional("_normal_dist_inv_cdf", nargs, 3, 3)) { |
| 27 | goto exit; |
| 28 | } |
| 29 | p = PyFloat_AsDouble(args[0]); |
| 30 | if (PyErr_Occurred()) { |
| 31 | goto exit; |
| 32 | } |
| 33 | mu = PyFloat_AsDouble(args[1]); |
| 34 | if (PyErr_Occurred()) { |
| 35 | goto exit; |
| 36 | } |
| 37 | sigma = PyFloat_AsDouble(args[2]); |
| 38 | if (PyErr_Occurred()) { |
| 39 | goto exit; |
| 40 | } |
| 41 | _return_value = _statistics__normal_dist_inv_cdf_impl(module, p, mu, sigma); |
| 42 | if ((_return_value == -1.0) && PyErr_Occurred()) { |
| 43 | goto exit; |
| 44 | } |
| 45 | return_value = PyFloat_FromDouble(_return_value); |
| 46 | |
| 47 | exit: |
| 48 | return return_value; |
| 49 | } |
| 50 | /*[clinic end generated code: output=ba6af124acd34732 input=a9049054013a1b77]*/ |