Conversation
|
|
Rounding of numbers can be done in binary or in decimal. The ECMA-402 rounding modes are designed for use in decimal rounding. They should always be available when rounding a decimal and should never be available when rounding a float. |
Since we've agreed that |
Resolve conflicts in spec.emu and intl.emu caused by changes on main: - Drop [[RoundingMode]] from records returned by GetAmountOptions and GetAmountConvertToOptions, and drop the roundingMode GetOption calls. - Pass *"halfEven"* literal as the rounding mode to CreateFormatterObject, keeping main's newer call structure. - Take main's deletion of the 402-specific sup-amount.prototype.convertto override in intl.emu. - index.html intentionally not regenerated in this commit.
|
(I added a merge commit to resolve the conflict with main.) |
|
I think that we want to have |
I need to correct my own comment. Looking at #86, I see that |
|
My understanding of the prior consensus is that we want to do the conversion using Number values, but then always apply rounding to the result, getting us a String value. I am, however, open to considering that a We may also want to reconsider whether the min/max versions of the significant/fraction digit options might make sense also for the constructor, but this is already getting quite a bit beyond the scope of this PR. |
|
On today's call we resolved to keep the |
After some consideration, and in response to concerns raised by @waldemarhorwat at the plenary, I think we should drop
roundingModeas a constructor or.convertTo()option, and instead always use round-ties-to-even.This would match what the rest of ECMA-262 is doing, and avoid the problems caused by truncation. This would not prohibit the definition and use of rounding mode as a formatting option, either in the Intl.NumberFormat constructor options, or in Amount's
.toLocaleString()options.