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

u160 arithmetic #138

Open
6 tasks
aszepieniec opened this issue Oct 15, 2024 · 0 comments
Open
6 tasks

u160 arithmetic #138

aszepieniec opened this issue Oct 15, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@aszepieniec
Copy link
Contributor

We need this for block consensus programs, for the difficulty adjustment.

Needed operations:

  • comparision (less than)
  • addition
  • subtraction
  • multiplication of a u160 with a u32 (asserting no overflow)
  • multiplication of two u160s (asserting no overflow)
  • division (not sure we need this one but listed for completeness)

The compiler should be able to handle this as well through an array of 5 u32s.

Co-authored-by: @Sword-Smith

@aszepieniec aszepieniec added the good first issue Good for newcomers label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant