• Home
  • Raw
  • Download

Lines Matching refs:ndigits

906 double_round(double x, int ndigits) {  in double_round()  argument
917 buf = _Py_dg_dtoa(x, 3, ndigits, &decpt, &sign, &buf_end); in double_round()
964 double_round(double x, int ndigits) { in double_round() argument
966 if (ndigits >= 0) { in double_round()
967 if (ndigits > 22) { in double_round()
970 pow1 = pow(10.0, (double)(ndigits-22)); in double_round()
974 pow1 = pow(10.0, (double)ndigits); in double_round()
983 pow1 = pow(10.0, (double)-ndigits); in double_round()
993 if (ndigits >= 0) in double_round()
1028 Py_ssize_t ndigits; in float___round___impl() local
1042 ndigits = PyNumber_AsSsize_t(o_ndigits, NULL); in float___round___impl()
1043 if (ndigits == -1 && PyErr_Occurred()) in float___round___impl()
1055 if (ndigits > NDIGITS_MAX) in float___round___impl()
1058 else if (ndigits < NDIGITS_MIN) in float___round___impl()
1063 return double_round(x, (int)ndigits); in float___round___impl()
1262 Py_ssize_t length, ndigits, fdigits, i; in float_fromhex() local
1362 ndigits = coeff_end - coeff_start; in float_fromhex()
1364 if (ndigits == 0) in float_fromhex()
1366 if (ndigits > Py_MIN(DBL_MIN_EXP - DBL_MANT_DIG - LONG_MIN/2, in float_fromhex()
1396 while (ndigits > 0 && HEX_DIGIT(ndigits-1) == 0) in float_fromhex()
1397 ndigits--; in float_fromhex()
1398 if (ndigits == 0 || exp < LONG_MIN/2) { in float_fromhex()
1409 top_exp = exp + 4*((long)ndigits - 1); in float_fromhex()
1410 for (digit = HEX_DIGIT(ndigits-1); digit != 0; digit /= 2) in float_fromhex()
1428 for (i = ndigits-1; i >= 0; i--) in float_fromhex()
1437 for (i = ndigits-1; i > key_digit; i--) in float_fromhex()