accounting.jstoFixed()
のメソッドを見てください。これにより、丸め誤差が修正され、お金が正しくフォーマットされます
toFixed() - better rounding for floating point numbers
/**
* Implementation of toFixed() that treats floats more like decimals
*
* Fixes binary rounding issues (eg. (0.615).toFixed(2) === "0.61") that present
* problems for accounting- and finance-related software.
*/
var toFixed = lib.toFixed = function(value, precision) {
precision = checkPrecision(precision, lib.settings.number.precision);
var power = Math.pow(10, precision);
// Multiply up by precision, round accurately, then divide and use native toFixed():
return (Math.round(lib.unformat(value) * power) / power).toFixed(precision);
};
リンク: http: //josscrowcroft.github.com/accounting.js/#methods