-
Notifications
You must be signed in to change notification settings - Fork 93
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
accept numbers with large exponent #892
accept numbers with large exponent #892
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #892 +/- ##
===========================================
- Coverage 92.99% 92.97% -0.02%
===========================================
Files 85 85
Lines 8061 8072 +11
===========================================
+ Hits 7496 7505 +9
- Misses 565 567 +2
Continue to review full report in Codecov by Sentry.
|
fe5141a
to
c87dde2
Compare
This will theoretically fail for numbers like Does |
|
No, it only tests that parse doesn't result in an error. |
Maybe we should consider such numbers errors instead (as far as I can see, we don't even check for overflow of the corresponding variable at the moment). |
Considering them errors should be fine. |
c87dde2
to
42a9d7b
Compare
|
42a9d7b
to
5092cc9
Compare
|
5092cc9
to
28ba617
Compare
|
28ba617
to
3d751ad
Compare
|
This changes treatment of numbers with exponents larger than
INT_MAX
. The current behaviour is somewhat arbitrary: we reject numbers with exponents that do not fit intoINT_MAX
, but we accept numbers with exponents that do not fit indouble
(we parse those numbers as infinity).This PR removes the inconsistency by just setting exponent to
INT_MAX
. The alternative solution to inconsistency -- making it an error if the exponent doesn't fit intodouble
is undesirable. Parsing such numbers as infinity/zero is actually standard practice.