Skip to content

Commit 8a518f4

Browse files
committed
am_pow_t is probably needs to be 64 bit because some hard coded values that I can't find.
1 parent 3ae10ee commit 8a518f4

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

include/fast_float/float_common.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ template <typename UC> struct parse_options_t {
8686
: format(fmt), decimal_point(dot), base(b) {}
8787

8888
/** Which number formats are accepted */
89-
chars_format format;
89+
const chars_format format;
9090
/** The character used as decimal point */
91-
UC decimal_point;
91+
const UC decimal_point;
9292
/** The base used for integers */
93-
uint_fast8_t base; /* only allowed from 2 to 36 */
93+
const uint_fast8_t base; /* only allowed from 2 to 36 */
9494
};
9595

9696
using parse_options = parse_options_t<char>;
@@ -465,10 +465,8 @@ umul128_generic(uint64_t ab, uint64_t cd, uint64_t *hi) noexcept {
465465

466466
// slow emulation routine for 32-bit
467467
#if !defined(__MINGW64__)
468-
fastfloat_really_inline FASTFLOAT_CONSTEXPR14 uint64_t _umul128(uint64_t ab,
469-
uint64_t cd,
470-
uint64_t *hi)
471-
noexcept {
468+
fastfloat_really_inline FASTFLOAT_CONSTEXPR14 uint64_t
469+
_umul128(uint64_t ab, uint64_t cd, uint64_t *hi) noexcept {
472470
return umul128_generic(ab, cd, hi);
473471
}
474472
#endif // !__MINGW64__
@@ -510,7 +508,7 @@ typedef int_fast8_t am_bits_t;
510508

511509
// Power bias is signed for handling a denormal float
512510
// or an invalid mantissa.
513-
typedef int_fast16_t am_pow_t;
511+
typedef int_fast64_t am_pow_t;
514512

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

0 commit comments

Comments
 (0)