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

Plugin is rounding decimal numbers value for "large" numbers #17

Open
jsanta opened this issue Oct 20, 2014 · 0 comments
Open

Plugin is rounding decimal numbers value for "large" numbers #17

jsanta opened this issue Oct 20, 2014 · 0 comments

Comments

@jsanta
Copy link

jsanta commented Oct 20, 2014

Hi.
I'm getting some differences in expected value an resulting value. Tried

$.format.number(123456789.36, '#,##0.00')
returns: "123,456,789.36"

and works as expected returning a "123,456,789.36"

Tried

$.format.number(123412365456789.36, '#,##0.00')
returns: "123,412,365,456,789.37"

$.format.number(123456789123456789.99, '#,##0.00')
returns: "123,456,789,123,456,780.00"

$.format.number(99876543212323.69, '#,##0.00');
returns: "99,876,543,212,323.68"

and the return values are clearly different from the expected formatted numbers:

  • "123,412,365,456,789.36"
  • "123,456,789,123,456,789.99"
  • "99,876,543,212,323.69"

(regardless any rounding that has to be made, numbers have to respect their value unless a rounding is really needed).

I hope you can provide a patch for this issue. For the project I'm working on I can make an ugly replacement (based on String comparing), but it won't solve the issue.

Best regards from Chile.

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