In JavaScript and many other languages, numbers are represented as a mantissa multiplied by an exponent.
Numbers are stored with this amount of bits:
* Sign bit: 1 bit
* Mantissa (Significand): 52 bits
* Exponent: 11 bits
The mantissa can store a number from 0 to 2^52 = 4503599627370495
This is a 15 and a half digits number.
Any error after the 15th digit is normal and expected.
There is no bug as such here.