Skip to content

[bigint] Add to_int and improve from_int#49

Merged
forfudan merged 1 commit intomainfrom
work
Mar 23, 2025
Merged

[bigint] Add to_int and improve from_int#49
forfudan merged 1 commit intomainfrom
work

Conversation

@forfudan
Copy link
Copy Markdown
Owner

This pull request includes several changes to the BigInt structure in the src/decimojo/bigint/bigint.mojo file to improve its functionality and add new initialization methods. Additionally, new tests have been added to validate these changes.

Enhancements to BigInt structure:

  • src/decimojo/bigint/bigint.mojo: Added new initialization methods for BigInt including __init__ with different parameter signatures and the to_int method for converting BigInt to Int. Updated the from_components method to from_raw_words and improved documentation and examples.

New tests:

  • tests/bigint/test_bigint_to_int.mojo: Added new tests to validate the to_int method and __int__ operator for various numerical cases, including edge cases and error scenarios.

@forfudan forfudan merged commit b8c9991 into main Mar 23, 2025
1 check passed
@forfudan forfudan deleted the work branch March 23, 2025 17: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