unchecked int math inconsistency with Java

Description

Environment

None

Attachments

1

Activity

Show:

Colin Jones December 31, 2010 at 9:42 PM

This looks like a case where, in minusP, negateP was properly promoting the negation of -9223372036854775808 (Long/MIN_VALUE) to a BigInt, but that promotion didn't propagate to addP. The Ops that got used in addP was ops(-9223372036854775808), not ops(9223372036854775808N).

The attached patch makes sure the BigInt contamination goes all the way through, and adds a few tests verifying the correct behavior.

Completed

Details

Assignee

Reporter

Approval

Ok

Patch

Code and Test

Priority

Fix versions

Created December 13, 2010 at 1:49 PM
Updated April 8, 2011 at 3:01 PM
Resolved April 8, 2011 at 3:01 PM