ref: sd29x9::pow intermediate positive values are strictly < min. neg. value#280
ref: sd29x9::pow intermediate positive values are strictly < min. neg. value#2800xNeshi wants to merge 3 commits intorelease-v1.1from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-v1.1 #280 +/- ##
================================================
- Coverage 89.87% 89.82% -0.06%
================================================
Files 19 19
Lines 1787 1788 +1
Branches 484 484
================================================
Hits 1606 1606
Misses 168 168
- Partials 13 14 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Adjusts SD29x9::pow overflow validation to respect the asymmetric signed boundary: positive results must be strictly less than the magnitude reserved for -2^127, while negative results may equal it (to allow min()).
Changes:
- Introduces a local
limitfor theMIN_NEGATIVE_VALUEmagnitude boundary. - Updates the per-iteration overflow assertion in
powto enforce< limitfor non-negative results and<= limitfor negative results.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… pow Agent-Logs-Url: https://github.com/OpenZeppelin/contracts-sui/sessions/af15164d-616a-4f49-9fd9-8abc5f612c5f Co-authored-by: 0xNeshi <19427053+0xNeshi@users.noreply.github.com>
|
Is this going to be superceded by the binary exponentiation implementation? |
|
re: https://github.com/OpenZeppelin/contracts-sui/pull/280/checks?check_run_id=69324773853 Very difficult to find base + exponent that results exactly in |
Not superseded, the PRs solve different problems, responded there |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adjusts
SD29x9::powoverflow validation to respect the asymmetric signed boundary: positive results must be strictly less than the magnitude reserved for-2^127, while negative results may equal it (to allowmin()).The overflow assertion now uses a local
min_negativevariable (consistent withwrap_components) and is expressed in the clearer formres_mag < min_negative || (res_neg && res_mag == min_negative).PR Checklist