Lines Matching defs:exp
981 buf + 8: (1 extra for '0', 1 for sign, 5 for exp, 1 for '\0'). */
1315 long exp, top_exp, lsb, key_digit;
1323 * The limit is chosen to ensure that, writing exp for the exponent,
1325 * (1) if exp > LONG_MAX/2 then the value of the hex string is
1328 * (2) if exp < LONG_MIN/2 then the value of the hex string is
1331 * (3) if LONG_MIN/2 <= exp <= LONG_MAX/2 then there's no danger of
1332 * overflow in the calculation of exp and top_exp below.
1344 * 2**(exp-4*ndigits) <= |x| < 2**(exp+4*ndigits).
1346 * Now if exp > LONG_MAX/2 then:
1348 * exp - 4*ndigits >= LONG_MAX/2 + 1 - (LONG_MAX/2 + 1 - DBL_MAX_EXP)
1352 * double, so overflows. If exp < LONG_MIN/2, then
1354 * exp + 4*ndigits <= LONG_MIN/2 - 1 + (
1361 * It's easy to show that if LONG_MIN/2 <= exp <= LONG_MAX/2 then both
1362 * exp+4*ndigits and exp-4*ndigits are within the range of a long.
1437 exp = strtol(exp_start, NULL, 10);
1440 exp = 0;
1454 if (ndigits == 0 || exp < LONG_MIN/2) {
1458 if (exp > LONG_MAX/2)
1462 exp = exp - 4*((long)fdigits);
1465 top_exp = exp + 4*((long)ndigits - 1);
1482 if (exp >= lsb) {
1486 x = ldexp(x, (int)(exp));
1491 half_eps = 1 << (int)((lsb - exp - 1) % 4);
1492 key_digit = (lsb - exp - 1) / 4;
1520 x = ldexp(x, (int)(exp+4*key_digit));