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

Decode floats with overflowing mantissa. #263

Open
deadalnix opened this issue May 31, 2023 · 0 comments
Open

Decode floats with overflowing mantissa. #263

deadalnix opened this issue May 31, 2023 · 0 comments
Labels

Comments

@deadalnix
Copy link
Contributor

deadalnix commented May 31, 2023

This is a follow up to #246 . Floats with overflowing mantissa needs to be rounded the proper way.

Relevant code:

if (overflow) {
return getError(location, "Integral too large to fit in 64 bits.");
}

See what fast_float does when there are too many digits:
https://github.com/fastfloat/fast_float/blob/3a63b00d53549dc5a91aa1960ed81dd5f9dd8161/include/fast_float/ascii_number.h#L229-L245
https://github.com/fastfloat/fast_float/blob/3a63b00d53549dc5a91aa1960ed81dd5f9dd8161/include/fast_float/parse_number.h#L211-L225

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

No branches or pull requests

1 participant