The problem here is that all numbers in JS are IEEE 754 64 bit numbers (1 bit sign, 11 bit exponent, 52 bit mantissa). Allowing for imprecision will solve the false negative, but will increase the chance of false positives at the same time.
A better solution would be to go beyond this number format and use something like big.js instead.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The problem here is that all numbers in JS are IEEE 754 64 bit numbers (1 bit sign, 11 bit exponent, 52 bit mantissa). Allowing for imprecision will solve the false negative, but will increase the chance of false positives at the same time.
A better solution would be to go beyond this number format and use something like big.js instead.