[BUG] umul192_lower128
can error on due to overflow on addition
#84
Labels
umul192_lower128
can error on due to overflow on addition
#84
Description
The function
umul192_lower128
, used in writing floats, can overflow in rare circumstances in the following logic:The wrapping is actually desired, as shown by the failing test case.
In Python code, we have the same logic with the following:
This means
hi + (hi_lo >> 64) as u64
is expected to wrap.Prerequisites
Here are a few things you should provide to help me understand the issue:
rustc 1.62.0-nightly (6dd68402c 2022-05-11)
Test case
Please provide a short, complete (with crate import, etc) test case for
the issue, showing clearly the expected and obtained results.
Example test case:
The text was updated successfully, but these errors were encountered: