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

E-notation of numbers #109

Open
walter-weinmann opened this issue Mar 16, 2017 · 3 comments
Open

E-notation of numbers #109

walter-weinmann opened this issue Mar 16, 2017 · 3 comments
Milestone

Comments

@walter-weinmann
Copy link

If the sign after the e/E is '+' or missing, the number of the following digits seems to restricted to 3:

5e+12            ok
5e+123           ok
5e+1234          not ok
5e+12345         not ok
5e123            ok
5e1234           not ok
5e12345          not ok

@talentdeficit talentdeficit added this to the 3.0 milestone Mar 16, 2017
@talentdeficit
Copy link
Owner

i made a design decision to always decode numbers in 'exponent' form to floats but this means you can't represent anything larger than ~1.78e308

do you actually see these values in use? i surveyed common json libraries and most made the same design decision i did, but if this is an actual real world problem i can look at adding support for integer 'exponent' decoding in v3.0

@walter-weinmann
Copy link
Author

walter-weinmann commented Mar 17, 2017

Many thanks for the explanation. This problem is not a real world problem. I have only generated test data based on the ECMA standard. I am quite happy if you want to close this issue (perhaps a note in the documentation ?).

@talentdeficit
Copy link
Owner

i should definitely improve the error message. badarg is pretty useless

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

No branches or pull requests

2 participants