Describe the bug
Incorrect values for modInverse function
To Reproduce
Steps to reproduce the behavior:
@Test
fun testModInverse() {
val a = BigInteger.parseString("54647")
.modInverse(BigInteger.parseString("1157920"))
assertEquals(
BigInteger.parseString("1141223"),
a
)
Expected :1141223
Actual :-16697
Expected behavior
In java.math this test is successful:
@Test
public void testModInverse() {
BigInteger a = new BigInteger("54647")
.modInverse(new BigInteger("1157920"));
assertEquals(new BigInteger("1141223"), a);
}
Describe the bug Incorrect values for modInverse function
To Reproduce Steps to reproduce the behavior:
Expected behavior In java.math this test is successful: