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

Formatting large numbers gives unexpected results #675

Open
borglin opened this issue Jun 23, 2021 · 0 comments
Open

Formatting large numbers gives unexpected results #675

borglin opened this issue Jun 23, 2021 · 0 comments

Comments

@borglin
Copy link

borglin commented Jun 23, 2021

When you format a number that would be expressed using exponential notation by javascript and the base has a decimal part the decimals and the exponent is prepended to the original number.

Sugar.Number.format(10000000000000000000000, 2) => "1e+22" which is expected, but Sugar.Number.format(12000000000000000000000, 2) => "1.2e+22.2e+22" should just be "1.2e+22"

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