Opened 6 years ago
Closed 6 years ago
#12199 closed Bugs (fixed)
cpp_bin_float addition: bad rounding when difference beetween exponents of operands is equal to # of bits in significand
Reported by: | Michael Shatz | Owned by: | John Maddock |
---|---|---|---|
Milestone: | To Be Determined | Component: | multiprecision |
Version: | Boost 1.60.0 | Severity: | Problem |
Keywords: | Cc: |
Description
If the difference of exponents of two cpp_bin_float values is exactly equal to # of bits in significand then result of addition is not rounded correctly.
Platform: Mingw, gcc 5.3.0, x64. All optimization levels. Library version: both 1.60.0 and the newest files from github
Attachments (1)
Change History (2)
by , 6 years ago
Attachment: | add_test.cpp added |
---|
comment:1 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Reproduced in master, but not current develop - suspect it was fixed in previous commits for the other issues. Added some better tests for this: https://github.com/boostorg/multiprecision/commit/0397d8bcd8d9139737b22c98880c85e19c821b99