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

Add DivMod() #113

Merged
merged 1 commit into from
Mar 25, 2022
Merged

Add DivMod() #113

merged 1 commit into from
Mar 25, 2022

Conversation

chfast
Copy link
Collaborator

@chfast chfast commented 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 requested a review from holiman March 22, 2022 13:21
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #113 (3448159) into master (77643b2) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 3448159 differs from pull request most recent head 0acb8c5. Consider uploading reports for the commit 0acb8c5 to get more accurate results

@@            Coverage Diff            @@
##            master      #113   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines         1396      1403    +7     
=========================================
+ Hits          1396      1403    +7     

Copy link
Owner

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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 force-pushed the divmod branch 2 times, most recently from 3448159 to 0acb8c5 Compare March 25, 2022 07:51
@chfast chfast merged commit 78905e8 into master Mar 25, 2022
@chfast chfast deleted the divmod branch March 25, 2022 08:55
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.

Include DivMod() method
2 participants