From 0d423367a5ee9ce37675b10031b968ac0f5ff0e3 Mon Sep 17 00:00:00 2001 From: IRainman Date: Mon, 29 Dec 2025 19:08:10 +0300 Subject: [PATCH] type usage fixes. --- include/fast_float/decimal_to_binary.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/fast_float/decimal_to_binary.h b/include/fast_float/decimal_to_binary.h index 2c30cc5..f2ff571 100644 --- a/include/fast_float/decimal_to_binary.h +++ b/include/fast_float/decimal_to_binary.h @@ -141,13 +141,15 @@ compute_float(am_pow_t q, am_mant_t w) noexcept { // branchless approach: value128 product = compute_product(q, w); but in // practice, we can win big with the compute_product_approximation if its // additional branch is easily predicted. Which is best is data specific. - am_pow_t const upperbit = product.high >> 63; - am_pow_t const shift = upperbit + 64 - binary::mantissa_explicit_bits() - 3; + auto const upperbit = product.high >> 63; + auto const shift = upperbit + 64 - binary::mantissa_explicit_bits() - 3; // Shift right the mantissa to the correct position answer.mantissa = product.high >> shift; - answer.power2 = detail::power(q) + upperbit - lz - binary::minimum_exponent(); + answer.power2 = + detail::power(q) + + static_cast(upperbit - lz - binary::minimum_exponent()); // Now, we need to round the mantissa correctly.