Skip to content

[pull] master from williamfiset:master#139

Merged
pull[bot] merged 5 commits intoUncodedtech:masterfrom
williamfiset:master
Apr 3, 2026
Merged

[pull] master from williamfiset:master#139
pull[bot] merged 5 commits intoUncodedtech:masterfrom
williamfiset:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Apr 3, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

williamfiset and others added 5 commits April 2, 2026 15:55
…#1314)

* Refactor ChineseRemainderTheorem: reuse PrimeFactorization, add tests

Remove duplicated primeFactorization, pollardRho, isPrime, and gcf methods
in favor of the shared PrimeFactorization class. Simplify prime-power grouping
loop and clean up Javadoc. Add 17 JUnit 5 tests covering eliminateCoefficient,
crt, reduce, egcd, and full reduce+crt integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Keep CRT self-contained: inline prime factorization with Miller-Rabin

Restore primeFactorization, pollardRho, isPrime, and supporting methods
as private methods within ChineseRemainderTheorem rather than delegating
to PrimeFactorization. Uses the improved Miller-Rabin primality test and
overflow-safe mulMod instead of the original trial-division isPrime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Simplify class Javadoc: remove @link references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Expand class Javadoc with detailed CRT explanation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove UNTESTED note from Chinese remainder theorem in README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Replace fragile MAX/MIN overflow guards with overflow-safe mulMod via
BigInteger, supporting the full long range. Simplify the bit-mask
exponentiation loop to standard binary exponentiation. Remove inline
main() test code and add 11 JUnit 5 tests including a randomized check
against BigInteger.modPow.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename for clarity, add input validation, clean up Javadoc, remove
main() and inline test helper. Add 10 JUnit 5 tests including BigInteger
reference validation and edge cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pull pull bot locked and limited conversation to collaborators Apr 3, 2026
@pull pull bot added the ⤵️ pull label Apr 3, 2026
@pull pull bot merged commit 6068e10 into Uncodedtech:master Apr 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant