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

Parse floats with exponent part #30

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

zuiderkwast
Copy link
Collaborator

Erlang is odd here, since Erlang requires a decimal fraction part (i.e. a dot followed by digits). The number "1e100" needs to be rewritten to "1.0e100" before parsing it using binary_to_float/1.

Erlang is odd here, since Erlang requires a decimal fraction part
(i.e. a dot followed by digits). The number "1e100" needs to be
rewritten to "1.0e100" before parsing it using binary_to_float/1.
@zuiderkwast zuiderkwast requested a review from bjosv March 9, 2023 09:44
Copy link
Collaborator

@bjosv bjosv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good finding.

I just noticed in the RESP3 spec that it states Exponential format is invalid., isn't that using an exponent?

@zuiderkwast
Copy link
Collaborator Author

Good finding.

I just noticed in the RESP3 spec that it states Exponential format is invalid., isn't that using an exponent?

Yep, I saw that too. I already opened these:

@zuiderkwast zuiderkwast changed the title Parse floats with exponent part without decimal fraction part Parse floats with exponent part Mar 9, 2023
@zuiderkwast zuiderkwast merged commit bef0417 into Ericsson:main Mar 9, 2023
@zuiderkwast zuiderkwast deleted the parse-floats-with-exponent branch March 9, 2023 14:45
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

Successfully merging this pull request may close these issues.

2 participants