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