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

fix overflow issue in interpolation #1480

Merged
merged 1 commit into from Aug 28, 2022
Merged

fix overflow issue in interpolation #1480

merged 1 commit into from Aug 28, 2022

Conversation

PSeitz
Copy link
Contributor

@PSeitz PSeitz commented Aug 24, 2022

use saturating_sub and saturating_add to cover edge cases with values close to u64::MAX or 0 in combination with imprecise computation

fixes #1479

use saturating_sub and saturating_add to cover edge cases with values close to u64::MAX or 0 in combination with imprecise computation
@codecov-commenter
Copy link

Codecov Report

Merging #1480 (3984caf) into main (513f682) will decrease coverage by 0.00%.
The diff coverage is 83.20%.

@@            Coverage Diff             @@
##             main    #1480      +/-   ##
==========================================
- Coverage   94.08%   94.07%   -0.01%     
==========================================
  Files         239      239              
  Lines       44768    44800      +32     
==========================================
+ Hits        42120    42146      +26     
- Misses       2648     2654       +6     
Impacted Files Coverage Δ
fastfield_codecs/src/bitpacked.rs 100.00% <ø> (ø)
fastfield_codecs/src/main.rs 1.01% <0.00%> (ø)
src/fastfield/mod.rs 94.76% <ø> (-0.01%) ⬇️
src/fastfield/reader.rs 88.67% <42.85%> (+0.94%) ⬆️
src/fastfield/serializer/mod.rs 89.26% <82.75%> (-1.03%) ⬇️
fastfield_codecs/src/lib.rs 97.22% <95.83%> (+0.62%) ⬆️
fastfield_codecs/src/blockwise_linear.rs 100.00% <100.00%> (ø)
fastfield_codecs/src/linear.rs 99.58% <100.00%> (ø)
src/fastfield/gcd.rs 100.00% <100.00%> (ø)
src/fastfield/writer.rs 91.18% <100.00%> (ø)
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@PSeitz PSeitz merged commit 5d43675 into main Aug 28, 2022
@PSeitz PSeitz deleted the overflow_issue branch August 28, 2022 23:44
@fulmicoton
Copy link
Collaborator

@PSeitz approved... but let's switch to integer arithmetics.

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.

attempt to subtract with overflow
3 participants