Opened 6 years ago

Closed 6 years ago

#12580 closed Bugs (fixed)

cpp_bin_float: Bad rounding in corner case of subtraction

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

Description

Subtraction produces incorrectly rounded result when a small number in range (ULP*0.5..ULP*1.0) subtracted from integer power of 2. The correct answer should be (original number - ULP), but boost returns unmodified original number.

Attachments (1)

sub_from_pow2.cpp (940 bytes ) - added by Michael Shatz 6 years ago.
demonstrates incorrect rounding in corner case of subtraction

Download all attachments as: .zip

Change History (2)

by Michael Shatz, 6 years ago

Attachment: sub_from_pow2.cpp added

demonstrates incorrect rounding in corner case of subtraction

comment:1 by John Maddock, 6 years ago

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