Opened 6 years ago

Closed 6 years ago

#12195 closed Bugs (fixed)

cpp_bin_float infinity does not change sign when multiplied/divided by negative number

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

Description

When cpp_bin_float number with value=infinity multiplied or divided by negative number the product keeps the previous sign of infinity instead of changing the sign to the opposite.

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

Attachments (1)

inf_test.cpp (540 bytes ) - added by Michael Shatz 6 years ago.
demonstrate wrong sign of result of multiplication of infinity

Download all attachments as: .zip

Change History (2)

by Michael Shatz, 6 years ago

Attachment: inf_test.cpp added

demonstrate wrong sign of result of multiplication of infinity

comment:1 by John Maddock, 6 years ago

Resolution: fixed
Status: newclosed

This should now be fixed in develop.

Also added support for sign-related functions (signbit, copysign etc) for types with signed-zero, and added signed zero support to cpp_bin_float.

Note: See TracTickets for help on using tickets.