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

Include DivMod() method #103

Closed
2opremio opened this issue Dec 3, 2021 · 0 comments · Fixed by #113
Closed

Include DivMod() method #103

2opremio opened this issue Dec 3, 2021 · 0 comments · Fixed by #113
Assignees

Comments

@2opremio
Copy link

2opremio commented Dec 3, 2021

We have started using https://github.com/holiman/uint256 at https://github.com/stellar/go and we are missing the DivMod() method.

This has required invoking Div() and Mod() separately, which isn't great for performance.

@chfast chfast self-assigned this Mar 12, 2022
chfast added a commit that referenced this issue Mar 22, 2022
DivMod() sets z to the quotient x div y and m to the modulus x mod y
and returns the pair (z, m) for y != 0.
If y == 0, both z and m are set to 0 (OBS: differs from the big.Int).

Closes #103.
@chfast chfast mentioned this issue Mar 22, 2022
chfast added a commit that referenced this issue Mar 25, 2022
DivMod() sets z to the quotient x div y and m to the modulus x mod y
and returns the pair (z, m) for y != 0.
If y == 0, both z and m are set to 0 (OBS: differs from the big.Int).

Closes #103.
chfast added a commit that referenced this issue Mar 25, 2022
DivMod() sets z to the quotient x div y and m to the modulus x mod y
and returns the pair (z, m) for y != 0.
If y == 0, both z and m are set to 0 (OBS: differs from the big.Int).

Closes #103.
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 a pull request may close this issue.

2 participants