Lines Matching defs:prec
189 Py_ssize_t prec;
229 prec = 0;
233 prec = (prec * 10) + (*f - '0');
319 if (prec <= 0) {
324 while (i < prec && p[i]) {
411 formatfloat(PyObject *v, int flags, int prec, int type,
427 if (prec < 0)
428 prec = 6;
433 p = PyOS_double_to_string(x, type, prec, dtoa_flags, NULL);
458 formatlong(PyObject *v, int flags, int prec, int type)
464 return _PyUnicode_FormatLong(v, flags & F_ALT, prec, type);
473 result = _PyUnicode_FormatLong(iobj, flags & F_ALT, prec, type);
642 int prec = -1;
754 /* Parse precision. Example: "%.3f" => prec=3 */
756 prec = 0;
769 prec = _PyLong_AsInt(v);
770 if (prec == -1 && PyErr_Occurred())
772 if (prec < 0)
773 prec = 0;
778 prec = c - '0';
783 if (prec > (INT_MAX - ((int)c - '0')) / 10) {
786 "prec too big");
789 prec = prec*10 + (c - '0');
792 } /* prec */
825 if (prec >= 0 && len > prec)
826 len = prec;
835 if (prec >= 0 && len > prec)
836 len = prec;
846 && width == -1 && prec == -1
881 temp = formatlong(v, flags, prec, c);
898 if (width == -1 && prec == -1
903 res = formatfloat(v, flags, prec, c, NULL, &writer, res);
909 if (!formatfloat(v, flags, prec, c, &temp, NULL, res))