Skip to content

feat: half-GCD in ℤ [ √- 2 ] #688

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

yelhousni
Copy link
Collaborator

@yelhousni yelhousni commented May 20, 2025

Description

This PR provides arithmetic in ℤ[√−2], particularly the half-GCD needed in Consensys/gnark#1499.

This code can probably be refactored with eisenstein/ but this PR is unlikely to be merged. So I'm keeping it as is for demonstration purposes.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

Tests implemented in zz2_test.go.

How has this been benchmarked?

N/A

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

@yelhousni yelhousni changed the title feat: half-GCD in ZZ[sqrt(-2)] feat: half-GCD in ℤ [ √- 2 ] May 21, 2025
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