I'm writing a specific validator and needed the modulus of a 16 digit number. Noticed that the operator % doesn't work correctly after 15 digits. I can rewrite my code to check less digits, but I could not find this limitation anywhere in the documentation. What is the reason for this working badly?
Tried checking these values in a normal .ts file:
console.log(10000000000000000%97);
console.log(10000000000000001%97);
console.log(10000000000000002%97);
console.log(10000000000000003%97);
console.log(10000000000000004%97);
Expected result when using a the regular calculator is:
62
63
64
65
66
On the other hand, the output was:
62
62
64
66
66