Skip to content

Add checked modops + Fix linear_nth bug for modulo 2**64 + Refactor #88

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

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

byeongkeunahn
Copy link
Collaborator

@byeongkeunahn byeongkeunahn commented Apr 26, 2024

  • 그냥 modops 함수들(modadd 등) -> modulo 0인 경우는 modulo가 해당 type의 MAX값 + 1인 2의 거듭제곱인 것으로 처리
  • checked_ prefix 붙은 modops 함수들(checked_modadd 등) -> modulo 0이면 panic, otherwise calls non-prefixed routines
  • modulo가 음수이면 여전히 오류 처리
  • modops의 modulo 0 지원을 이용해 reeds_sloane 및 linear_nth 리팩터링

@byeongkeunahn byeongkeunahn merged commit 0cd02b8 into boj-rs:main Apr 26, 2024
8 checks passed
@byeongkeunahn byeongkeunahn deleted the add-checked-modops branch April 26, 2024 06:43
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.

1 participant