You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@yukinotech 1.05 in the source code is converted to 1.0500000000000000444089209850062616169452667236328125 floating point value, then Number#toFixed is applied;
Both algorithms are defined to work with exact mathematical value.
Well, there is a problem with Intl.NumberFormat, where they want to look at 1.0500000000000000444089209850062616169452667236328125 as the 1.05 and so do the "toRawFixed" differently, and the spec is still not defined well (see tc39/ecma402#128)
In node or chrome(v8) , when the result of toFixed is rounded, the result is not accurate . because number is float
however , in BigDecimal ,we can claculate an exact value by roundMode
The same problem appeared in BigDecimal.prototype.toExponential
The text was updated successfully, but these errors were encountered: