Opened 7 years ago

Closed 7 years ago

#11364 closed Bugs (fixed)

Multiprecision exclusive OR operator (^) gives incorrect results

Reported by: Graham Clemow <boostbug@…> Owned by: John Maddock
Milestone: Boost 1.59.0 Component: multiprecision
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

When using multiprecision types such as int128_t the exclusive OR of any pair of values with opposite sign which differ by exactly 2 to the power 32 gives an incorrect zero result. So in the attached example c is incorrect and d is correct.

Attachments (1)

Test.cpp (406 bytes ) - added by Graham Clemow <boostbug@…> 7 years ago.
Example program

Download all attachments as: .zip

Change History (3)

by Graham Clemow <boostbug@…>, 7 years ago

Attachment: Test.cpp added

Example program

comment:1 by John Maddock, 7 years ago

Confirmed, investigating.

comment:2 by John Maddock, 7 years ago

Milestone: To Be DeterminedBoost 1.59.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.