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

Test/metal/bigint #26

Merged
merged 6 commits into from
Dec 24, 2024
Merged

Test/metal/bigint #26

merged 6 commits into from
Dec 24, 2024

Conversation

moven0831
Copy link
Collaborator

@moven0831 moven0831 commented Dec 24, 2024

Related Issues

Updating test cases and improving the handling of BigInt operations. The most important changes involve modifying test cases to use random values and ensuring that operations can handle overflow or underflow well.

Key takeaway

  • log_limb_size and num_limb will affect the accuracy of carry handling during add/sub. Need to adjust according to the optimal limb size of Montgomery Multiplication choice. In this case, mont_mul_cios with log_limb_size = 16 for BN254 basefield.

Test Case Improvements:

Misc File Updates:

@moven0831 moven0831 self-assigned this Dec 24, 2024
…eration for overflow detection

- Updated `test_bigint_add_unsafe` to generate random BigInt values that do not overflow during addition.
- Modified `test_bigint_add_overflow` to ensure it tests for overflow by generating random BigInt values that do overflow.
- Adjusted limb size from 13 to 16 in both tests for consistency and accuracy.
- Improved assertions to compare results directly with expected values derived from the generated inputs.
@moven0831 moven0831 linked an issue Dec 24, 2024 that may be closed by this pull request
@moven0831 moven0831 merged commit 95b36ca into main Dec 24, 2024
1 check passed
@moven0831 moven0831 deleted the test/metal/bigint branch December 24, 2024 09:37
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