aherbert commented on code in PR #359:
URL: https://github.com/apache/commons-math/pull/359#discussion_r4700966464
##########
commons-math-legacy-core/src/test/java/org/apache/commons/math4/legacy/core/dfp/DfpTest.java:
##########
@@ -116,6 +116,24 @@ public void testLongConstructor() {
Assert.assertEquals("9223372036854775807.", new Dfp(field,
Long.MAX_VALUE).toString());
}
+ @Test
+ public void testLongConstructorBeyondPrecision() {
+ // 4 radix digits (16 decimal digits) cannot hold every long
+ final DfpField small = new DfpField(10);
Review Comment:
Thanks for the more explicit tests. Please raise a PR with a fix to the
String parsing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]