[Number_Theory] Add Miller-Rabin and Pollard-rho factorisation to the explorer
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
Direzione di ricerca
Start with the primality and factorisation code in Number_Theory/src/core/NumberTheoryEngine.cpp at the cited line ranges, then inspect Number_Theory/src/widgets/FactorizationTreeWidget.cpp and the QML views. First check how the existing engine exposes algorithms to the UI and how its tests measure primality and factorisation. Done means the stated large-prime timing and factorisation example pass, with the result displayed as a tree.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Primality uses trial division (O(sqrt n), about 5e8 iterations near 2^63, and i*i overflows there). Factorisation, the most visual topic, exists only as an unused primeFactorization() and in the deleted widget UI.
Location
Number_Theory/src/core/NumberTheoryEngine.cpp:298-309Number_Theory/src/core/NumberTheoryEngine.cpp:373-405Number_Theory/src/widgets/FactorizationTreeWidget.cpp
Evidence
UBSan harness: testPrimality(9223372036854775783) reports NumberTheoryEngine.cpp:304:29: runtime error: signed integer overflow: 3037000505 * 3037000505 and had not finished after 120 s.
Expected
Instant deterministic primality for all 64-bit n and a factorisation tree visualisation.
Proposed fix
Implement deterministic Miller-Rabin (bases 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37) with __int128 mulmod, Pollard's rho (Brent), and a new Prime Factorization algorithm with a QML tree view. Keep trial division as an educational "step mode" for small n.
Acceptance criteria
- isPrime(2^63-25) returns true in < 10 ms
- Factorisation of 600851475143 -> 71 * 839 * 1471 * 6857 shown as a tree
Repository audit, November 2026 · Phase 9 · New features · evidence: found by code reading · ref core-cpp-033
Generated by Claude Code
- Lingua principale
- C++
- Stelle
- 2
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ibra-kdbra/Math-Problems
-
area: security-algorithms priority: P1 size: XS type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
ibra-kdbra/Math-Problems#417 ·
-
area: math-chaos priority: P3 size: S type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ibra-kdbra/Math-Problems#397 ·
-
area: docs-site good first issue priority: P3 size: XS type: chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ibra-kdbra/Math-Problems#379 ·
-
area: docs-site good first issue priority: P3 size: XS type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
ibra-kdbra/Math-Problems#378 ·
-
area: docs-site good first issue priority: P2 size: XS type: chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ibra-kdbra/Math-Problems#367 ·
Tutte le issue di ibra-kdbra/Math-Problems
Issue simili
-
c++ easy first-contributor first-contributors good first issue help wanted up-for-grabs
Difficoltà 1/5 1-3 ore Idoneità per principianti 94/100
fork-commit-merge/fork-commit-merge#8709 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
-
Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
bug data-types
Difficoltà 2/5 1-3 ore Idoneità per principianti 71/100
ClickHouse/clickhouse-odbc#680 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ionut-mihalache/aqua#31 · 1 commento ·