Large numbers erroneously rounded in JavaScript

后端 未结 6 1127
夕颜
夕颜 2020-11-21 23:58

See this code:



        
6条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 00:27

    It is not caused by this json parser. Just try to enter 714341252076979033 to fbug's console. You'll see the same 714341252076979100.

    See this blog post for details: http://www.exploringbinary.com/print-precision-of-floating-point-integers-varies-too

提交回复
热议问题