Skip to content

Refresh the Risch baseline for five entries the engine now verifies - #148

Open
s-celles wants to merge 3 commits into
JuliaSymbolics:mainfrom
s-celles:test/refresh-difficult-baseline
Open

s-celles wants to merge 3 commits into
JuliaSymbolics:mainfrom
s-celles:test/refresh-difficult-baseline

Conversation

@s-celles

@s-celles s-celles commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Every difficult run currently ends with the harness asking for this:

Risch improvements vs baseline (engine got better — tighten test/difficult_baseline.jl on this PR):
  [3] sin(x)               expected=1 actual=0
  [26] sin(x)*(x^2)        expected=1 actual=0
  [27] cos(x)*(x^3)        expected=1 actual=0
  [49] sin(5x)*(2 + 3x)    expected=1 actual=0
  [55] sin(1 / x) / (x^2)  expected=1 actual=0

Those five integrands now verify symbolically against the reference antiderivative, instead
of returning an equivalent form the harness cannot check (code 1).

They appear identically on all nine difficult jobs — Julia 1.10, 1 and pre across ubuntu,
macos and windows — of several unrelated pull requests (#138, #140, #141, #146, #147), so this
is dependency drift rather than the effect of any one change. That is why it is refreshed on
its own branch instead of being folded into a feature PR, where it would look like part of
that change.

Only the Risch column moves, from 1 to 0. The RuleBased column is untouched. The file is
indexed by position, so it still holds 177 entries and the spot checks [15] = (0, 2) and
[158] = (1, 2) are unchanged.

This does not by itself turn difficult green: improvements do not fail the gate, only
regressions do. The one regression it reports, entry 15, is fixed by #147.

Assisted by: AI

CI on head 4ca1327

29 pass, 0 fail — and the difficult group is green.

Before current main was merged in, this pull request failed nine difficult jobs. All
nine were the same single RuleBased regression, baseline entry 15,
sin(sqrt(1+x))/sqrt(1+x), which fails identically on main and which #147 fixes. Merging
main cleared them without touching a line of this change.

…fies

Every `difficult` run currently prints

    Risch improvements vs baseline (engine got better — tighten
    test/difficult_baseline.jl on this PR):
      [3] sin(x)              expected=1 actual=0
      [26] sin(x)*(x^2)       expected=1 actual=0
      [27] cos(x)*(x^3)       expected=1 actual=0
      [49] sin(5x)*(2 + 3x)   expected=1 actual=0
      [55] sin(1 / x) / (x^2) expected=1 actual=0

Those five now verify symbolically against the reference antiderivative instead
of returning an unverifiable equivalent form. They show up identically on all
nine `difficult` jobs (Julia 1.10, 1 and pre across ubuntu, macos and windows)
of several unrelated pull requests, so this is dependency drift rather than any
one change, which is why it is refreshed on its own here rather than folded into
a feature branch.

Only the Risch expectation moves, from 1 to 0; the RuleBased column is
untouched. The file stays at 177 entries, and it is indexed by position, so the
spot checks [15] `(0, 2)` and [158] `(1, 2)` are unchanged.

Assisted-by: AI
@codecov-commenter

codecov-commenter commented Sep 27, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.19%. Comparing base (8647f0d) to head (4ca1327).
⚠️ Report is 27 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #148      +/-   ##
==========================================
+ Coverage   50.98%   51.19%   +0.21%     
==========================================
  Files          23       23              
  Lines        4309     4213      -96     
==========================================
- Hits         2197     2157      -40     
+ Misses       2112     2056      -56     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

s-celles-bot added a commit to s-celles/SymbolicIntegration.jl that referenced this pull request Oct 9, 2026
CI reported one RuleBased regression on this head, `[158]
sqrt(2 - x - x^2)/x^2`, expected 0 and got 1, on ubuntu, macos and windows
alike.

It is not a regression of the engine. The residual `r - ref` carries floats —
`0.35355339059327373` and `2.8284271247461903`, that is `1/(2*sqrt(2))` and
`2*sqrt(2)` — and they come from the reference value, not from the result: in
this corpus `sqrt(2)` is Julia's `sqrt` on an `Int`. The `SymbolicUtils = "4.49"`
bound that JuliaSymbolics#136 brings into this branch makes the integrator's own output exact,
so an exact result now faces an inexact reference and `simplify` cannot cancel
the difference. The entry verified on the earlier head only because both sides
were inexact.

This is the same defect this PR already fixes for four other Apostol entries, and
158 is a fifth that was missed. Its two bare `sqrt(2)` become
`sqrt(Symbolics.Num(2))`, the public spelling used for the others — `Symbolics`
is reachable from `lib/SymbolicIntegrationMaxima`, which reads the same corpus,
whereas an internal helper would not be.

Verified: the reference is now free of floats, `simplify(r - ref; expand = true)`
is `0`, and the harness scores the entry 0 again, so the baseline stays `(0, 2)`.

`TEST_GROUP=difficult`: exit 0, **no regressions**, RuleBased up from 93 to 94
successes, Risch unchanged at 58 with 0 errors. The improvements the run still
lists are left alone: entry 132 keeps its tolerant value, which its own comment
explains returns code 2 on Julia pre and Windows, and the five Risch entries
belong to JuliaSymbolics#148.

Assisted-by: AI
Brings in JuliaSymbolics#147, which fixes baseline entry 15,
`sin(sqrt(1+x))/sqrt(1+x)`. That was the single RuleBased regression failing the
`difficult` gate on this pull request; it came from `main`, not from refreshing
the baseline.

No conflict. `TEST_GROUP=difficult` on the merged branch: exit 0, **no
regressions**, and the five Risch entries this pull request tightens no longer
appear as improvements — they now match the baseline, which is the whole point.
RuleBased 92 succeeded, Risch 58, 0 errored.

The one improvement the run still reports, entry 132, is left alone on purpose:
its own comment records that RuleBased returns code 1 on most platforms but code
2 on Julia pre and Windows, so the tolerant value is deliberate and tightening
it would break those two.

Assisted-by: AI
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.

3 participants