Skip to content

[Tooling] Exact integer-Horner logarithm intervals with pinned equivalence tests - #667

Closed
yuj1r0 wants to merge 1 commit into
CrocSwap:mainfrom
yuj1r0:codex/exact-log-horner
Closed

yuj1r0 wants to merge 1 commit into
CrocSwap:mainfrom
yuj1r0:codex/exact-log-horner

Conversation

@yuj1r0

@yuj1r0 yuj1r0 commented Oct 13, 2026

Copy link
Copy Markdown

Change and mathematical scope

This adds an opt-in exact logarithm kernel using homogeneous integer Horner evaluation. It returns the same lower and upper rational fractions as the retained 80-term log_unit: no series term, remainder, precision, rounding, surcharge or admission decision changes.

The package replaces repeated Fraction powers/additions with 79 integer Horner updates. PROOF.md gives the algebraic identity and invariant for every exact rational input in [1,2]; finite tests corroborate the implementation. The pinned reference, fixtures, original code and proof are byte-identical to the user's ChatGPT-produced ZIP.

No production activation or new κ. All additions are under research/exact-log-horner/. Existing engines, supplier inputs, upstream/ and the selected certificate stay unchanged. Adopting this kernel in a production caller remains a separate integration with affected source-pin updates and full replay.

Fresh macOS arm64 / CPython 3.12.8 measurements, seven alternating-order repetitions on identical inputs:

Workload Reference median Horner median Speedup
Logarithm microbatch, 20 × 9 arguments 51.424 ms 4.840 ms 10.62×
Native-complex accepted/adjacent endpoint pair 14.881 ms 6.133 ms 2.43×
Three charged pairs, six endpoints total 43.783 ms 19.167 ms 2.28×

These are arithmetic workloads, not full frontier replay or multiplication runtime. The original Linux evidence is retained separately; fresh codex- receipts identify this submission replay. Exact outputs are compared after every timed pair; no input-dependent result cache is used.

Validation

python3 -B research/exact-log-horner/verify.py --benchmark
python3 -I -O -B research/exact-log-horner/verify.py
python3 -B research/exact-log-horner/test_package.py

Python 3.10+ standard library only. Expected markers: PASS_EXACT_LOG_HORNER and PASS_PACKAGE_CONTROLS.

Passed freshly from a full checkout at exact base 66849e1475c930fd7732b1a0067ffee7e1e95f60:

  • 5,872 exact logarithm comparisons, six charged accept/adjacent-reject moment endpoints and five pricing controls per engine.
  • Eight numerically detected implementation mutations, 24 inherited domain rejections, three non-exact-input rejections, and two exact integer endpoints.
  • Eight package/source corruption controls, including optimized Python and paths with spaces.
  • Normal and optimized results match the original handoff fingerprint c926bc76b11c982a477174b4c09ea0be2b4c549ae4dcd8215d7ac19deb91202a.
  • All seven upstream path identities and extracted profile/endpoint fields match the complete repository. Reference Git blob: 14a90fa0e788217856f070382c9e61bd7c603c61.
  • Final manifest/reference checks and staged whitespace check pass.

No full supplier rebuild, repository-wide suite, 47-inequality assembly, second moment engine, Lean or remote CI pass is claimed. Physical/count/compiler/hosting/precision/tape/analytic obligations remain inherited.

The original seed-89 claim is preserved. Final overlap checks include open metadata through #665 and a log_unit PR search with zero results. #662's Clifford helper acceleration concerns a different workload; #585/#605's Lean logarithm/moment work is credited. No pinned coordination issue exists, so coordination and result are recorded locally.

Prepared at Tuomo Kiiskinen's request with substantial OpenAI ChatGPT assistance; subsequent source review, full-checkout replay and PR preparation used OpenAI Codex. NOTICE.md retains the original engine and selected-supplier contributors' attribution. Apache-2.0.

@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Thank you @yuj1r0. This contribution is now retained on main in the scoped 100-PR review and contributor credits.

Contribution: Exact integer-Horner logarithm intervals.

Review and limits: Opt-in tooling with identical rational interval endpoints and pinned equivalence controls. Microbenchmarks are not frontier-replay timings; production activation remains separate.

The complete original source, notices and relevant execution evidence are retained through the pinned source archive. The review distinguishes fresh local runs, source-bound historical Linux CI and prior exact-head review; it does not claim 100 fresh full mathematical audits. Closing this historical PR as reconciled. This preserves parallel and cumulative credit without replacing the selected frontier or promoting priced research targets to completed constructions.

Reviewed head: 8d6ffc19ca56af24d8bd525b6c3133842741b766. Publication: 64039f1bd3b6a523b96083fd858ad040a75e3030.

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.

2 participants