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

feat: add BigUint class for dimensionless numbers #5621

Closed
wants to merge 4 commits into from
Closed

feat: add BigUint class for dimensionless numbers #5621

wants to merge 4 commits into from

Conversation

LesterEvSe
Copy link

@LesterEvSe LesterEvSe commented Jul 29, 2024

Description

Problem*

Resolves

Summary*

I noticed that the standard library can't work with numbers larger than 32 bytes, and the code bigint doesn't work because it uses types u56 and u112. So I adapted the code to blocks of length u32, added a few new methods, and made it generic.

Additional Context

An example of use can be found in the tests. In the generic type, you need to specify the number of blocks that the BigUint type will contain (that is, 4 times more bytes).

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Contributor

Thank you for your contribution to the Noir language.

Please do not force push to this branch after the Noir team have started review of this PR. Doing so will only delay us merging your PR as we will need to start the review process from scratch.

Thanks for your understanding.

@LesterEvSe LesterEvSe closed this Jul 29, 2024
@LesterEvSe LesterEvSe reopened this Jul 29, 2024
@LesterEvSe LesterEvSe closed this Jul 29, 2024
@LesterEvSe LesterEvSe changed the title BigUint module feat: add BigUint class for dimensionless numbers Jul 29, 2024
@LesterEvSe LesterEvSe reopened this Jul 29, 2024
@Savio-Sou
Copy link
Collaborator

Hi @LesterEvSe, thank you for submitting the PR!

The https://github.com/noir-lang/noir-bignum library is recently coming to offer arbitrarily-sized BigUInts outside of stdlib. Would you like to give it a spin and see if migrating the PR over there makes sense?

@Savio-Sou
Copy link
Collaborator

Closing per off-GitHub discussion following the comment above.

Thank you for the contribution nonetheless!

@Savio-Sou Savio-Sou closed this Jul 29, 2024
@LesterEvSe
Copy link
Author

Hi @LesterEvSe, thank you for submitting the PR!

The https://github.com/noir-lang/noir-bignum library is recently coming to offer arbitrarily-sized BigUInts outside of stdlib. Would you like to give it a spin and see if migrating the PR over there makes sense?

Yes, I think it makes sense. Your library is more optimized and versatile

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.

2 participants