Lines Matching refs:rounded
958 /* version of double_round that uses the correctly-rounded string<->double
964 double rounded;
998 rounded = _Py_dg_strtod(mybuf, NULL);
1000 if (errno == ERANGE && fabs(rounded) >= 1.)
1002 "rounded value too large to represent");
1004 result = PyFloat_FromDouble(rounded);
1016 /* fallback version, to be used when correctly rounded binary<->decimal
1034 /* if y overflows, then rounded value is exactly x */
1083 double x, rounded;
1090 rounded = round(x);
1091 if (fabs(x-rounded) == 0.5)
1093 rounded = 2.0*round(x/2.0);
1094 return PyLong_FromDouble(rounded);
1223 /* TOHEX_NBITS is DBL_MANT_DIG rounded up to the next integer
1448 * Compute rounded value of the hex string *
1477 /* lsb = exponent of least significant bit of the *rounded* value.
1490 containing the first bit to be rounded away. */
1515 /* overflow corner case: pre-rounded value <
1516 2**DBL_MAX_EXP; rounded=2**DBL_MAX_EXP. */