Add Euclidean division APIs and coverage#5
Merged
Conversation
Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/c85ad039-95b9-4128-9b7d-5e78ee454c16 Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/c85ad039-95b9-4128-9b7d-5e78ee454c16 Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/c85ad039-95b9-4128-9b7d-5e78ee454c16 Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/c85ad039-95b9-4128-9b7d-5e78ee454c16 Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/c85ad039-95b9-4128-9b7d-5e78ee454c16 Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eisenwave/integer-division/sessions/c85ad039-95b9-4128-9b7d-5e78ee454c16 Co-authored-by: eisenwave <22040976+eisenwave@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
eisenwave
May 13, 2026 08:52
View session
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The paper now includes Euclidean quotient/remainder operations, but this repo did not yet implement them. This change adds the Euclidean APIs and covers the key correctness property: the remainder is always non-negative and strictly less than
abs(y).API surface
div_rem_euclid(x, y)for Euclidean quotient/remainder pairsdiv_euclid(x, y)for quotient-only accessrem_euclid(x, y)as a dedicated direct remainder computation instead of projecting fromdiv_rem_euclidImplementation
x == y * q + r0 <= r < abs(y)for signed inputsTest coverage
static_assertcases for sign combinations of dividend/divisorintandunsignedto verify:div_euclid/rem_euclidmatchdiv_rem_euclid