Skip to content

fix(math/bitslice): fix partition upper part range check width #1165

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

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

ivokub
Copy link
Collaborator

@ivokub ivokub commented Jun 12, 2024

Description

Fixes #1153.

Also handle separately case when nbDigits >= Fr width as we need to check that we do not overflow and use unique decomposition. There isn't a better way beyond doing bit-by-by comparison against the modulus, so this case is deferred to math/bits package.

Added some package documentation.

Shouldn't affect current usage of the implementation as we call everywhere with nbDigits small.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

  • TestIssue1153

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ivokub ivokub added consolidate strengthen an existing feature doc labels Jun 12, 2024
@ivokub ivokub self-assigned this Jun 12, 2024
@ivokub ivokub requested a review from gbotrel June 12, 2024 15:26
@ivokub ivokub marked this pull request as ready for review June 12, 2024 15:26
@ThomasPiellard ThomasPiellard merged commit 7cab7a3 into master Jun 28, 2024
7 checks passed
@ThomasPiellard ThomasPiellard deleted the fix/partition-bounds branch June 28, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consolidate strengthen an existing feature doc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: restrict nbDigits in std/math/bitslice Partition method
2 participants