A numerical problem of js, can anyone help explain it?

the last three digits of my stored value are 102
, and the final deposit is 104

.

what is the problem of js? solve

Mar.30,2021

take a look at this article, the calculation of too long numbers in js is not accurate.
https://codeshelper.com/a/11.


the first feeling is a loss of precision.


js https://www.cnblogs.com/xingg. reference


after your number exceeds Number.MAX_SAFE_INTEGER, and exceeds this number, js cannot guarantee precision. For example, you can see:

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39e0e-2c1c1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39e0e-2c1c1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?