Repository navigation
feat: extend symbolic integration across five benchmark gaps - #441
Closed
KingArth0r wants to merge 1 commit into
Closed
KingArth0r wants to merge 1 commit into
KingArth0r wants to merge 1 commit into
Conversation
arnog
added a commit
that referenced
this pull request
Oct 15, 2026
… precision, integration gaps PR #436 (enumeratio, fix #434): the JavaScript target lowers HurwitzZeta, LerchPhi, PolyLog, EllipticK, the complete EllipticE, Hypergeometric2F1 and LambertW to the interpreter's complex kernel in `auto` and `complex` mode where the operand facts do not prove the value real; `strict` keeps the real kernel and its NaN; a complex operand takes the complex kernel in every mode. The verdict lives in one place (`complexContinuation`), read by both `isComplexValued` and the emitters. The GLSL and WGSL targets decline a provably complex value, now including a positive integer order on the cut `z > 1` (`PolyLog(2, 3)`, `LerchPhi(3, 2, 1)`). `Arcsec` and `Arccsc` of an operand of unknown magnitude type `complex | infinity | nan` instead of `number`, so the compiled lanes read the complex value. PR #440 (enumeratio, fix #439): `Argument` of a complex value passes the bignum parts to `Arctan2`, so `N(Argument(e + iπ), 25)` carries 25 digits. Also from #439: `Transpose` of an operand with no known shape is typed `unknown` (a union such as `matrix | vector` is transposed member by member), so `MatrixMultiply(q, Transpose(q))` with a free `q` stays unevaluated instead of an `incompatible-type` error. PR #441 (KingArth0r): definite integrals of more families evaluate in closed form — an absolute value or sign of a non-affine argument is split at its exact roots; integer-cell sums (Floor, Ceil, Fract with an affine weight) and `|sin(kx + m)|` over many periods no longer grow with the cell count; `∫₀¹ {1/x} dx = 1 − γ` and `∫₀¹ ⌊1/x⌋ dx = +∞`; primitives for Erf, Erfc, BesselJ(1, ·), BesselI(1, ·), Digamma, Trigamma and PolyGamma of an affine argument (and `d/dx LogGamma = Digamma`); the nested exponential `∫ e^{x + e^x} dx`; the Bose moments `∫₀^∞ xⁿ/(e^{ax} − 1) dx`. With the Rubi rules loaded, a provider antiderivative with no value at a bound falls back to the built-in one. Loading the rules compiles each distinct pattern once, and an invalid `stepBudget` is rejected before compilation. The PR's profiling script and JSON record are not included. Review fixes on top of the PRs: a user definition with its own `compile` handler keeps its own lane; compiled `HurwitzZeta(1, z)` for a non-real `z` is the pole; the period shortcut declines outside radian mode; exact coefficients in the cell sums stay exact; a polygamma integral between two consecutive poles evaluates; the infinite-bound inert decision reads the heads that contain the variable. ROADMAP: the antiderivative of Sin and Cos ignores the degree angular unit (found by the review; pre-existing). Fix #434 Fix #439 Co-authored-by: enumeratio <314378874+enumeratio@users.noreply.github.com> Co-authored-by: KingArthur <118565558+KingArth0r@users.noreply.github.com>
Member
|
Merged by hand onto main as 403a216: the source, the tests and a CHANGELOG entry. The profiling script and its JSON record were left out of the tree. The review added: the period shortcut declines outside radian mode, exact coefficients stay exact, and a polygamma integral between two poles evaluates. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This addresses five concrete CE gaps exposed by Integral Benchmark, without changing the benchmark adapter to make the scores look better. Base:
2793af9d.Correctness and scope
Profiling and benchmark evidence
Reproducible commands and raw measurements are checked in:
scripts/profile-integration-gaps.tsbenchmarks/integration-gaps-profile.jsonThe baseline CPU profile attributed about 18.20 seconds of an 18.89-second cold rule load to
compileRuleDocs. Pattern reuse avoids 2,558 duplicate compilations (38.9%) while preserving all 6,574 rules with zero skips.Three alternating-order, fresh-process compilation samples, retaining the full compiled output in both variants, had medians of 5.42s uncached and 4.27s cached (about 21% lower locally). No other agent validation jobs ran concurrently. One cached sample was slower than its pair; all raw samples are included. This small experiment is not a universal speedup claim or a CI timing threshold. Idempotent same-engine reload was already fast and remains so; fresh-process benchmark startup must still be measured separately from solving.
Using the unchanged local Integral Benchmark harness/corpora:
LogGamma(x), but the verifier lacks that operator; it is explicitly not counted as verified.Which, not CE.Verification
git diff --checkclean.The broader run caught an affine nested-integral dispatch regression; that was fixed and pinned by an explicit ∫∫|x−y| test. Regression coverage also includes independently enumerated weighted cells, shifted/negative-frequency periods, exact irrational switches, reciprocal convergence/divergence, derivative checks at regular points, rejected domains, provider fallback/cancellation, binding isolation, and duplicate-pattern metadata preservation.
Benchmark-only adapter/verifier work remains separate from this PR.