Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounding modes #19

Open
littledan opened this issue Nov 13, 2019 · 1 comment
Open

Rounding modes #19

littledan opened this issue Nov 13, 2019 · 1 comment

Comments

@littledan
Copy link
Member

How should rounding modes be represented in BigDecimal? Some options:

  • Just do not support them, as bdldfp does
  • Pass them in as a parameter to certain methods that do arithmetic operations, as Java BigDecimal does
  • Global flag??? No, not consistent with how primitives work.
@littledan
Copy link
Member Author

I think we should support explicit rounding modes, at least in the .round() method. See also a discussion of rounding modes in Intl.NumberFormat v3. I think Decimal should match NumberFormat in the set of rounding modes and their semantics.

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

No branches or pull requests

1 participant