PDA

View Full Version : Number format strange behavior



jampoo
6 Dec 2015, 11:56 PM
if the precision is bigger than 10, the result is not what I expected, can anyone explain why and how to fix this?

Ext.util.Format.number("2120110.92", "000,000.0000000000")
"2,120,110.9199999999"


Ext.util.Format.number("2120110.92", "0,0.000000000")
"2,120,110.920000000"

Gary Schlosberg
7 Dec 2015, 4:02 PM
I believe that this is just JavaScript.
https://www.sencha.com/forum/showthread.php?234581
https://www.sencha.com/forum/showthread.php?91421