Closed TFloyd1989 closed 4 years ago
According to test3 and test4 in the LongIntegerQuizTest.java
, I think the answer would be 0 if adding 0 and -0. If adding -0 and 0, the answer would be -0. It seems to depend on the first term.
I'm having trouble getting digits to show the value -0. Even when I make a new byte test array "z" with a length of one and the value "-0" and then set digits to copy that array, the result still prints as 0.
According to https://emory.gitbook.io/dsa-java/java-essentials/unit-testing#test-longinteger, if the class LongInteger()
is implemented correctly, new LongInter("-0")
should be printed as "-0"
.
@TFloyd1989 Please close the issue if no further question on this issue :)
I have a simple question for quiz 1. If we create a test for adddifferentsigns adding 0 and -0, should the result be 0 or -0?