Skip to content

Drop rounding mode options#90

Open
eemeli wants to merge 1 commit intomainfrom
no-rounding-mode
Open

Drop rounding mode options#90
eemeli wants to merge 1 commit intomainfrom
no-rounding-mode

Conversation

@eemeli
Copy link
Copy Markdown
Member

@eemeli eemeli commented Mar 26, 2026

After some consideration, and in response to concerns raised by @waldemarhorwat at the plenary, I think we should drop roundingMode as 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.

@github-actions
Copy link
Copy Markdown

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://tc39.github.io/proposal-amount/pr-preview/pr-90/

Built to branch gh-pages at 2026-03-26 13:21 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@sffc
Copy link
Copy Markdown
Contributor

sffc commented Mar 26, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants