Skip to content

Conversation

@holiman
Copy link
Owner

@holiman holiman commented Apr 26, 2021

This PR does a couple of things

  • Aligns the API a bit more closely to big.Int. Primarily, by making NewInt(uint64) take an input parameter.
  • Changes AddOverflow(x, y *Int) bool -> AddOverflow(x, y *Int) (*Int, bool)
  • Changes SubOverflow(x, y *Int) bool -> SubOverflow(x, y *Int) (*Int, bool)
  • Adds AddUint64

Important This PR also fixes an error in SubUint64. Before this PR, if the receiver was not identical to the first argument, it would return wrong numbers in many cases, due to exiting early if the carry was zero.

@holiman holiman merged commit b323bdc into master Apr 26, 2021
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