JavaScript 中的 toFixed() 并非银行家舍入法
1.3335.toFixed(3); // 1.333
1.33335.toFixed(4); //1.3334
无论是用奇数进位法,还是偶数进位法,都无法正确的解释 js 中 toFixed() 方法。
1.3335.toFixed(3); // 1.333
1.33335.toFixed(4); //1.3334
无论是用奇数进位法,还是偶数进位法,都无法正确的解释 js 中 toFixed() 方法。