Opened 6 years ago

Closed 6 years ago

#12198 closed Bugs (fixed)

cpp_bin_float addition/subtraction produces wrong result when the difference of exponents of arguments overflows

Reported by: Michael Shatz Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

If the difference of exponents of two cpp_bin_float does not fit in specified exponent_type then addition and subtraction operations return the operand with smaller exponent instead of operand with bigger exponent.

Platform: Mingw, gcc 5.3.0, x64. All optimization levels. Library version: both 1.60.0 and the newest files from github

Attachments (1)

add_test.cpp (407 bytes ) - added by Michael Shatz 6 years ago.
demonstrates cpp_bin_float addition bug

Download all attachments as: .zip

Change History (2)

by Michael Shatz, 6 years ago

Attachment: add_test.cpp added

demonstrates cpp_bin_float addition bug

comment:1 by John Maddock, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.