I am trying to understand why I am not able to calculate the right modulo using JavaScript. The operation I have tried is:
Wrong answer
28493595674446332150349236018567871332790652257295571471311614363091332152517 % 6 = 4
The result should be 1.
28493595674446332150349236018567871332790652257295571471311614363091332152517 % 6 = 1
I have tried to convert this number to BN but unfortunately I always get the same answer. However if you use wolfram alpha or another math software it returns the right answer.
What's going on? What have I been doing wrong?