Skip to content

Commit

Permalink
Merge pull request #234 from beached/patch-1
Browse files Browse the repository at this point in the history
Update float_common.h
  • Loading branch information
lemire authored Dec 28, 2023
2 parents b90ba25 + b43f808 commit 68b9475
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fast_float/float_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ uint64_t umul128_generic(uint64_t ab, uint64_t cd, uint64_t *hi) {
uint64_t ad = emulu((uint32_t)(ab >> 32), (uint32_t)cd);
uint64_t bd = emulu((uint32_t)ab, (uint32_t)cd);
uint64_t adbc = ad + emulu((uint32_t)ab, (uint32_t)(cd >> 32));
uint64_t adbc_carry = !!(adbc < ad);
uint64_t adbc_carry = (uint64_t)(adbc < ad);
uint64_t lo = bd + (adbc << 32);
*hi = emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) +
(adbc_carry << 32) + !!(lo < bd);
(adbc_carry << 32) + (uint64_t)(lo < bd);
return lo;
}

Expand Down

0 comments on commit 68b9475

Please sign in to comment.