Skip to content

Update test reference files for SIZEOF_DOUBLE precision fix#1348

Open
BrentBaccala wants to merge 1 commit intoSingular:spielwiesefrom
BrentBaccala:fix-float-refs
Open

Update test reference files for SIZEOF_DOUBLE precision fix#1348
BrentBaccala wants to merge 1 commit intoSingular:spielwiesefrom
BrentBaccala:fix-float-refs

Conversation

@BrentBaccala
Copy link
Copy Markdown
Contributor

Summary

Details

Commit ec0b927 fixed a typo (SIZEOF_DOUBESIZEOF_DOUBLE) in libpolys/coeffs/numbers.h, changing SHORT_REAL_LENGTH from 6 to 16. This increased float output precision, causing reference file mismatches in tests that print floating-point results.

Affected tests (17 total):

  • Short/: bug_53, bug_55, bug_div, rInit, solve_s
  • Long/: tropical
  • Manual/: fglm_solve, laguerre_solve, lex_solve, number_pi, simplex, simplexOut, solve, triangL_solve, triangLf_solve, triangM_solve, triang_solve

All changes are exclusively float precision differences (6-10 digits → 16 digits, scientific notation formatting). Reference files regenerated with regress.cmd -g -m to preserve existing stat measurements from other machines.

Test plan

  • All 17 regenerated tests pass against current spielwiese
  • Short/ok_e.lst: no new failures
  • Manual/m.lst: 1332/1332 pass (was 1321/1332 before)
  • Verified all diffs are float-precision-only via decoded comparison

This PR was researched and written by an AI assistant (Claude) on behalf of Brent Baccala ([email protected]), based on analysis of test failures traced to the SIZEOF_DOUBLE precision fix (ec0b927).

Upstream commit ec0b927 fixed a typo (SIZEOF_DOUBE -> SIZEOF_DOUBLE)
in libpolys/coeffs/numbers.h, changing SHORT_REAL_LENGTH from 6 to 16.
This increased float output precision across Singular. PR Singular#1339 updated
one affected reference file (Example_1_8_7), but 17 other tests in
non-comprehensive lists still had stale reference files.

Affected tests:
- Short: rInit, solve_s, bug_53, bug_55, bug_div
- Long: tropical
- Manual: number_pi, simplex, simplexOut, solve, fglm_solve,
  laguerre_solve, lex_solve, triangLf_solve, triangL_solve,
  triangM_solve, triang_solve

All changes are exclusively float precision differences (more digits,
scientific notation formatting, "complex:N digits" display strings).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@BrentBaccala
Copy link
Copy Markdown
Contributor Author

Note for reviewers: none of the 17 tests in this PR are exercised by .github/workflows/runtests.yml, which runs only Old/universal.lst, Plural/short.lst, Plural/dmod.lst, Short/ok_s.lst, New/new.tst, and a filtered New.lst. These tests live on other lists:

Test Lists
Short/bug_53, Short/bug_55, Short/bug_div Short.lst
Short/rInit, Short/solve_s Short/ok_e.lst, Short/ok_g.lst, Short.lst
Long/tropical Long/ok_l2.lst
Manual/fglm_solve, laguerre_solve, lex_solve, number_pi, simplex, simplexOut, solve, triangL_solve, triangLf_solve, triangM_solve, triang_solve Manual/m.lst, Manual/all.lst

So CI will not detect any regression in these reference files. Verification was done locally:

  • All 17 regenerated tests pass against origin/spielwiese (commit 7a2ec83) on x86_64-Linux
  • Short/ok_e.lst runs cleanly (only the pre-existing missing paramet.tst failure)
  • Manual/m.lst now passes 1332/1332 (was 1321/1332 — the 11 fixed failures are exactly the float-affected tests in this PR)
  • All .res.gz.uu diffs were inspected after decoding and contain only float precision changes (6-10 → 16 digits, scientific notation formatting) — no algorithmic differences

This comment was written by an AI assistant (Claude) on behalf of Brent Baccala ([email protected]).

@BrentBaccala
Copy link
Copy Markdown
Contributor Author

Here's a bash command that will show all of the diffs in this commit:

for test in Short/bug_53 Short/bug_55 Short/bug_div Short/rInit Short/solve_s Long/tropical Manual/number_pi Manual/simplex Manual/simplexOut Manual/solve Manual/fglm_solve Manual/laguerre_solve Manual/lex_solve Manual/triangLf_solve Manual/triangL_solve Manual/triangM_solve Manual/triang_solve; do echo "=== $test ===" && diff <(git show spielwiese:Tst/${test}.res.gz.uu | uudecode -o /dev/stdout | gunzip) <(cat Tst/${test}.res.gz.uu | uudecode -o /dev/stdout | gunzip) 2>&1 && echo "---"; done

There are numerous places where the diffs do not appear to be caused by the SIZEOF_DOUBLE fix, but are still pretty cosmetic - changes from standard notation to scientific notation; changes in spacing.

@jankoboehm
Copy link
Copy Markdown
Member

Thanks a lot for pinpointing this! We were already planning to add more tests to the standard CI suite to avoid issues like that. If it is fine with you I would like to pursue the following route: I add first these tests (referenced as non-required) to the CI. This will then include the 17 tests affected here, as well as that of #1348. Once they are exercised in the CI and fail, we rerun the CI on your PR, verify green and merge.

@BrentBaccala
Copy link
Copy Markdown
Contributor Author

Very good!

If you're looking to update the CI suite, I'd suggest looking at #1276 as well.

It adds the ability to SSH into a test runner, which I've found to be quite useful at times.

I just updated it to make sure it's current.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants