You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been comparing ryu_generic128 output against other implementations and believe it generates incorrect output for certain exact powers of two. One example:
The "expected output" here agrees with both gdtoa and Swift's standard library, so I'm reasonably certain it's correct. Similar discrepancies occur for about 4000 other exact powers of two.
This issue seems to be limited to float80. I've not seen any similar failures for float128, double, float, or float16.
The text was updated successfully, but these errors were encountered:
The code compared the computed ieeeMantissa (which includes the explicit
leading one in the long double case) against 0, which is incorrect.
Fixes#175.
Thanks for the report. The reported powers of two are all cases where the next lower floating-point number is closer than the next higher floating-point number. The code detects that case by comparing the mantissa against 0, which is correct only if the format has an implicit leading one, but incorrect for an explicit leading one, as is the case for the Float80 format. I have a fix.
I've been comparing ryu_generic128 output against other implementations and believe it generates incorrect output for certain exact powers of two. One example:
The "expected output" here agrees with both gdtoa and Swift's standard library, so I'm reasonably certain it's correct. Similar discrepancies occur for about 4000 other exact powers of two.
This issue seems to be limited to float80. I've not seen any similar failures for float128, double, float, or float16.
The text was updated successfully, but these errors were encountered: