mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-07 02:09:52 +08:00
type usage fix.
This commit is contained in:
parent
3d69a9593e
commit
f9bac93deb
@ -141,8 +141,9 @@ compute_float(am_pow_t q, am_mant_t w) noexcept {
|
|||||||
// branchless approach: value128 product = compute_product(q, w); but in
|
// branchless approach: value128 product = compute_product(q, w); but in
|
||||||
// practice, we can win big with the compute_product_approximation if its
|
// practice, we can win big with the compute_product_approximation if its
|
||||||
// additional branch is easily predicted. Which is best is data specific.
|
// additional branch is easily predicted. Which is best is data specific.
|
||||||
am_bits_t const upperbit = static_cast<am_bits_t>(product.high >> 63);
|
auto const upperbit = static_cast<am_bits_t>(product.high >> 63);
|
||||||
am_bits_t const shift = upperbit + 64 - binary::mantissa_explicit_bits() - 3;
|
auto const shift = static_cast<am_bits_t>(
|
||||||
|
upperbit + 64 - binary::mantissa_explicit_bits() - 3);
|
||||||
|
|
||||||
// Shift right the mantissa to the correct position
|
// Shift right the mantissa to the correct position
|
||||||
answer.mantissa = product.high >> shift;
|
answer.mantissa = product.high >> shift;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user