Skip to content

512-bit cube root cbrt#505

Open
duncancmt wants to merge 40 commits intodcmt/sqrt512from
dcmt/cbrt512
Open

512-bit cube root cbrt#505
duncancmt wants to merge 40 commits intodcmt/sqrt512from
dcmt/cbrt512

Conversation

@duncancmt
Copy link
Collaborator

No description provided.

@duncancmt duncancmt requested a review from e1Ru1o February 24, 2026 09:08
@duncancmt duncancmt self-assigned this Feb 24, 2026
@duncancmt duncancmt requested a review from dekz as a code owner February 24, 2026 09:08
@immunefi-magnus
Copy link

🛡️ Immunefi PR Reviews

We noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below:

🔗 Send this PR in for review

Once submitted, we'll take care of assigning a reviewer and follow up here.

duncancmt and others added 14 commits February 24, 2026 12:30
Add detailed comments explaining why _cbrt never returns r_max + 1 in
the overflow regime (x > r_max^3), which would cause the 256-bit
cube-and-compare to silently produce wrong results. The argument traces
through the EVM execution: the truncated div(n, d) and carry-adjusted
r_lo_pre are both constant across the regime because res varies by only
~0.62·2^83 and the quotient's fractional part stays in [0.118, 0.283].

Add fuzz test targeting the overflow-cube regime specifically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant