Is expected value for TestReciprocal003() THE correct value ? #86
schlebe
started this conversation in
Discussions
Replies: 1 comment
Well your denominator value has 1 less three than mine:
so it makes sense that your ...48 would start 1 more decimal place to the left than mine. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have changed some functions in
BigDecimalapplication and I adapt now the tests.I have a issue with
TestReciprocal003()function.You indicate that requested value is "12.000000000000004" (with 15 decimal) but with my new
Divide()function I found another valuethat is "12.000000000000048" !
I tested using
BigIntegerand I get same value as mine !I tested with
Decimaland I get same value as mine !The expected value seems to be incorrect !
Your
Divide()function seems toPrecision-1and notPrecision!When I run your
Divide()function, I get 12.00000000000004 (with 14 decimal) but expected value (in test code) is 12.000000000000004 (with 15 decimal). Your computed value is correct limited to 14 decimals but requested precision is 15 !What you thing about ?
All reactions