René's URL Explorer Experiment


Title: R23-T055: Add extended_euclid trace and non-coprime doctests to chinese_remainder_theorem by code-paul-creator · Pull Request #65 · S-AI-Projects/TheAlgorithms-Python · GitHub

Open Graph Title: R23-T055: Add extended_euclid trace and non-coprime doctests to chinese_remainder_theorem by code-paul-creator · Pull Request #65 · S-AI-Projects/TheAlgorithms-Python

X Title: R23-T055: Add extended_euclid trace and non-coprime doctests to chinese_remainder_theorem by code-paul-creator · Pull Request #65 · S-AI-Projects/TheAlgorithms-Python

Description: Description Traces extended_euclid(10, 6) and chinese_remainder_theorem(5, 1, 7, 3) step by step (by hand and with pdb) and turns the observations into doctests: intermediate results of the recursion, the gcd identity, and the documented behaviour for non-coprime moduli. Related Issue Fixes: #55 Type of Change Bug Fix New Feature UI/UX Improvement Performance Improvement Tests Documentation Refactoring / Maintenance CI/CD Changes Made Added doctests to extended_euclid: intermediate results (2,0)->(1,0), (4,2)->(0,1), (6,4)->(1,-1), the identity ax + by == gcd (2 for (10, 6)), and the a < b swap case (5, 7). Added doctests to chinese_remainder_theorem: the result satisfies both congruences for coprime moduli, and a non-coprime input (6, 1, 4, 3) documented as unsupported. Existing 8 doctests unchanged (21 total). Added work/R23-T055/TRACE.md (tables of both traces, pdb steps, the surprise) and trace_driver.py. Screenshots / Recordings Testing python -m pytest --doctest-modules maths/chinese_remainder_theorem.py -> passed (21 doctests) ruff check maths/chinese_remainder_theorem.py -> all checks passed pdb traces recorded in work/R23-T055/TRACE.md and checked by hand Checklist I have tested my changes locally. I have added or updated tests, if needed. I have updated documentation, if needed. I have followed the project's coding guidelines. I have run the relevant tests and checks. I have addressed previous review feedback, if applicable. Additional Notes Finding: the existing doctest chinese_remainder_theorem(6, 1, 4, 3) -> 14 passes but 14 is not a valid solution (14 % 6 = 2, 14 % 4 = 2). 6 and 4 are not coprime, so extended_euclid(6, 4) gives ax + by = 2 instead of 1 and the formula breaks silently. A valid answer exists (7, modulo 12). Not fixed here (doctests only); documented in the new doctests and in work/R23-T055/TRACE.md. A follow-up could raise ValueError when gcd(n1, n2) != 1.

Open Graph Description: Description Traces extended_euclid(10, 6) and chinese_remainder_theorem(5, 1, 7, 3) step by step (by hand and with pdb) and turns the observations into doctests: intermediate results of the recursi...

X Description: Description Traces extended_euclid(10, 6) and chinese_remainder_theorem(5, 1, 7, 3) step by step (by hand and with pdb) and turns the observations into doctests: intermediate results of the recursi...

Opengraph URL: https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0138bea1-9881-7285-4289-7a0c65092a59
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE8D8:22B798:8B7AF:C5AC3:6AFDF925
html-safe-noncea2c5a383f27106eda86ec59253bf9a94987d0fded108d4f84ece473ca192235c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEQ4OjIyQjc5ODo4QjdBRjpDNUFDMzo2QUZERjkyNSIsInZpc2l0b3JfaWQiOiIyNDk3ODgzODQ4MzMwNDI3MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc15a89204fbe586578cdeb8b5d28979be6158c82aae71d32cd688c2a98522cb4
hovercard-subject-tagpull_request:5254567176
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
twitter:imagehttps://avatars.githubusercontent.com/u/260575160?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/260575160?s=400&v=4
og:image:altDescription Traces extended_euclid(10, 6) and chinese_remainder_theorem(5, 1, 7, 3) step by step (by hand and with pdb) and turns the observations into doctests: intermediate results of the recursi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneee3343385a977757dd145b28fabf4a119780f2615a5a36c5a89f66c9b3b5616d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/S-AI-Projects/TheAlgorithms-Python git https://github.com/S-AI-Projects/TheAlgorithms-Python.git
octolytics-dimension-user_id351892385
octolytics-dimension-user_loginS-AI-Projects
octolytics-dimension-repository_id1444141022
octolytics-dimension-repository_nwoS-AI-Projects/TheAlgorithms-Python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id63476337
octolytics-dimension-repository_parent_nwoTheAlgorithms/Python
octolytics-dimension-repository_network_root_id63476337
octolytics-dimension-repository_network_root_nwoTheAlgorithms/Python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release43ae91995f6e2d5ff7a491f3de438f1f723adeaa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FS-AI-Projects%2FTheAlgorithms-Python%2Fpull%2F65%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FS-AI-Projects%2FTheAlgorithms-Python%2Fpull%2F65%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=S-AI-Projects%2FTheAlgorithms-Python
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
S-AI-Projectshttps://github.com/S-AI-Projects
TheAlgorithms-Pythonhttps://github.com/S-AI-Projects/TheAlgorithms-Python
Codehttps://github.com/S-AI-Projects/TheAlgorithms-Python
Issues60 (60)https://github.com/S-AI-Projects/TheAlgorithms-Python/issues
Pull requests39 (39)https://github.com/S-AI-Projects/TheAlgorithms-Python/pulls
Actionshttps://github.com/S-AI-Projects/TheAlgorithms-Python/actions
Projectshttps://github.com/S-AI-Projects/TheAlgorithms-Python/projects
Security and qualityhttps://github.com/S-AI-Projects/TheAlgorithms-Python/security
Insightshttps://github.com/S-AI-Projects/TheAlgorithms-Python/insights
Sign up for GitHub https://github.com/signup?return_to=%2FS-AI-Projects%2FTheAlgorithms-Python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FS-AI-Projects%2FTheAlgorithms-Python%2Fissues%2Fnew%2Fchoose
code-paul-creatorhttps://github.com/code-paul-creator
S-AI-Projects:masterhttps://github.com/S-AI-Projects/TheAlgorithms-Python/tree/master
code-paul-creator:R23-T055https://github.com/code-paul-creator/TheAlgorithms-Python/tree/R23-T055
Conversation 0 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65
Commits 1 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/commits
Checks 0 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/checks
Files changed https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
R23-T055: Add extended_euclid trace and non-coprime doctests to chinese_remainder_theorem https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#top
Show all changes 1 commit https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
b28adbd R23-T055: add extended_euclid trace and non-coprime doctests code-paul-creator Nov 11, 2026 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/commits/b28adbd9c17abbc01d31e5e3e55b455eb8ac979d
Clear filters https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files
chinese_remainder_theorem.py https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-0edc9eca5c70959ea5a00aecc84c1acc2185790ce4e2727d91cb68f7a7060927
TRACE.md https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-3dd544af5198e195942b5799a97aadb843072807675dbf8f8a8595ffd6053d1c
trace_driver.py https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-6de28fe325776ff01dc5d8e888fe48e2a1cd0f28d91740769089dd35993f64b1
maths/chinese_remainder_theorem.pyhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-0edc9eca5c70959ea5a00aecc84c1acc2185790ce4e2727d91cb68f7a7060927
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/b28adbd9c17abbc01d31e5e3e55b455eb8ac979d/maths/chinese_remainder_theorem.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/{{ revealButtonHref }}
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-0edc9eca5c70959ea5a00aecc84c1acc2185790ce4e2727d91cb68f7a7060927
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-0edc9eca5c70959ea5a00aecc84c1acc2185790ce4e2727d91cb68f7a7060927
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-0edc9eca5c70959ea5a00aecc84c1acc2185790ce4e2727d91cb68f7a7060927
work/R23-T055/TRACE.mdhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-3dd544af5198e195942b5799a97aadb843072807675dbf8f8a8595ffd6053d1c
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/b28adbd9c17abbc01d31e5e3e55b455eb8ac979d/work/R23-T055/TRACE.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/{{ revealButtonHref }}
work/R23-T055/trace_driver.pyhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/files#diff-6de28fe325776ff01dc5d8e888fe48e2a1cd0f28d91740769089dd35993f64b1
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/b28adbd9c17abbc01d31e5e3e55b455eb8ac979d/work/R23-T055/trace_driver.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/65/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.