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

Use Fixed Point Arithmetic in Interval Parsing #3809

Closed
Tracked by #3958
tustvold opened this issue Mar 6, 2023 · 1 comment · Fixed by #4291
Closed
Tracked by #3958

Use Fixed Point Arithmetic in Interval Parsing #3809

tustvold opened this issue Mar 6, 2023 · 1 comment · Fixed by #4291
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@tustvold
Copy link
Contributor

tustvold commented Mar 6, 2023

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

The interval parsing logic added in #3762 makes use of floating point arithmetic to parse intervals. This can potentially lead to truncation and precision loss.

Describe the solution you'd like

The integral and fraction part of the interval_period should be parsed and handled separately, making use of checked multiplication and addition to avoid silent overflow

Describe alternatives you've considered

Additional context

@mr-brobot
Copy link
Contributor

FYI I'm working on this now and expect to have a PR open over the weekend. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants