Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public boolean equals(Object other) {
/** {@inheritDoc} */
@Override
public int hashCode() {
return d.hashCode();
return Double.hashCode(d.doubleValue());
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public void testEqualsAndHashCode() {
BigReal oneWithScaleOne = new BigReal(new BigDecimal("1.0"));
BigReal oneWithScaleTwo = new BigReal(new BigDecimal("1.00"));
Assert.assertEquals(oneWithScaleOne, oneWithScaleTwo);
Assert.assertEquals(oneWithScaleOne.hashCode(), oneWithScaleTwo.hashCode());
}

@Test
Expand Down