Closed wa1one closed 6 years ago
How to change mod function to my own mod function
It works as expected. BigInteger matches the behavior of plain JavaScript in this case:
-17 % 5 === -2
If you want to have the positive mod, you can add 5 to the result.
bigInt('-17').mod(bigInt('5'))
Should be 3