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

roundingMode w/ -0 #21

Closed
FrankYFTang opened this issue Aug 6, 2020 · 2 comments
Closed

roundingMode w/ -0 #21

FrankYFTang opened this issue Aug 6, 2020 · 2 comments
Labels
has-consensus Has consensus and ready to implement

Comments

@FrankYFTang
Copy link
Contributor

In http://userguide.icu-project.org/formatparse/numbers/rounding-modes
We see how each roundingMode return for some sample number
But in JavaScript we have -0 in additional to 0 :
What should -0 return when roundingMode: "up"? Should it be 0 or -1?
What should -0 return when roundingMode: "floor"? Should it be 0 or -1?

@sffc
Copy link
Collaborator

sffc commented Aug 7, 2020

The idea with the signDisplay proposal was that we never change the sign of a number while rounding, except when we treat -0 and +0 as equivalent in exceptZero.

In this case, -0 is an integer, and it shouldn't round to anything, because it's an integer. -0 in = -0 out.

@sffc sffc added the discuss Needs discussion to make progress label Oct 8, 2020
@sffc
Copy link
Collaborator

sffc commented Feb 11, 2021

2021-02-11: Adopt #21 (comment).

@sffc sffc added has-consensus Has consensus and ready to implement and removed discuss Needs discussion to make progress labels Feb 11, 2021
@sffc sffc closed this as completed in 8d8e9a6 Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-consensus Has consensus and ready to implement
Projects
None yet
Development

No branches or pull requests

2 participants