Skip to content

Commit 97aa629

Browse files
committed
* try to fix precision error on x86 platform step8.
1 parent 1ba0d48 commit 97aa629

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/fast_float/ascii_number.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ parse_number_string(UC const *p, UC const *pend,
439439
} else {
440440
// Now let's parse the explicit exponent.
441441
while ((p != pend) && is_integer(*p)) {
442-
if (exp_number < 0x1000) {
442+
if (exp_number < 0x10000000) {
443443
// check for exponent overflow if we have too many digits.
444444
UC const digit = UC(*p - UC('0'));
445445
exp_number = 10 * exp_number + static_cast<am_pow_t>(digit);

include/fast_float/bigint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ constexpr limb_t bigint_limbs = bigint_bits / limb_bits;
3939
// vector-like type that is allocated on the stack. the entire
4040
// buffer is pre-allocated, and only the length changes.
4141
template <limb_t size> struct stackvec {
42-
limb data[size] = {0};
42+
limb data[size];
4343
// we never need more than 150 limbs
4444
uint_fast8_t length{0};
4545

include/fast_float/float_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ typedef int_fast8_t am_bits_t;
446446

447447
// Power bias is signed for handling a denormal float
448448
// or an invalid mantissa.
449-
typedef int32_t am_pow_t;
449+
typedef int_fast32_t am_pow_t;
450450

451451
// Bias so we can get the real exponent with an invalid adjusted_mantissa.
452452
constexpr static am_pow_t invalid_am_bias = -0x8000;

0 commit comments

Comments
 (0)