Skip to content

pari: add 2.19.0 with complex Gaussian pivot fix - #56

Closed
dimpase wants to merge 2 commits into
mainfrom
fix/pari-complex-pivot
Closed

dimpase wants to merge 2 commits into
mainfrom
fix/pari-complex-pivot

Conversation

@dimpase

@dimpase dimpase commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Add a fork of Homebrew/core PARI 2.19.0 with the candidate complex Gaussian pivot fix reported in PARI bug #2708, investigated in cypari2 #234. Reject complex pivots whose squared norm is numerically zero, allowing the existing numerical recovery path to handle them.

Retain the mainline build settings and data-directory layout. Add regression tests for eigenvectors at every working precision from 15 through 193 bits and the shared matker/matrank/matimage/matindexrank failure at 53 bits. This is a candidate patch awaiting upstream review.

Validation: source builds, formula tests, strict audit, and style checks passed locally on macOS ARM64 (Apple Clang) and Linux ARM64 (brewed GCC 16). Installed Sage with Git cypari2 passes 48 precision checks on each of Python 3.13 and 3.14. Sage's PARI doctests have the same 130 failures with the original bottle and patched library; this patch does not address the separate precision/default-output differences.

The existing tap CI tests macOS Intel/ARM and Linux x86_64/ARM64. AI-assisted implementation and local validation by Codex.

On the local Tart Linux VM, the default GCC 13 source build crashed at GP startup with SIGILL; rebuilding with HOMEBREW_CC=gcc-16 passed. CI will check the default bottle build settings on the GitHub runners.

@dimpase

dimpase commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

Full upstream regression testing completed on the patched PARI 2.19.0 source trees retained from the local Homebrew builds.

Platform Compiler gp-sta gp-dyn
macOS ARM64 Apple Clang, formula build settings 264/264 groups passed 264/264 groups passed
Linux ARM64 (Tart VM) brewed GCC 16, formula build settings 264/264 groups passed 264/264 groups passed

make -j4 test-all returned 0 on both platforms, with zero failures and zero skipped groups: 1,056 successful group/executable runs in total. The optional elldata, galdata, galpol, seadata, and nflistdata datasets were available. nflistdata was downloaded from PARI's official package site and checked against its published SHA-256. A RUNTEST wrapper only selected the combined data directory; test inputs and expected outputs were not modified.

I also ran the additional targets that PARI explicitly excludes from test-all (config/get_tests), plus its kernel/prototype checks:

Additional target macOS ARM64 Linux ARM64
test-ploth Pass, static and dynamic Pass, static and dynamic
test-io Output mismatch Same output mismatch
test-parallel Stalls near the alarm(1, parfor(...)) check; terminated Pass, static and dynamic
test-install Pass, static and dynamic Pass, static and dynamic
test-time Pass, static and dynamic Pass, static and dynamic
test-env Expected /root, got macOS /var/root Pass, static and dynamic
test-kernel Cannot compile with pthread headers Same compilation error
test-proto Pass Pass

The extra I/O mismatch was reproduced with the unpatched Homebrew/core 2.19.0 bottle, with an identical diff. The macOS parallel test also exceeded a 30-second timeout with the unpatched bottle; the patched test originally stalled and was subsequently rechecked with the same timeout. These macOS runs were performed in the local command sandbox. The kernel check declares pari_mainstack and varpriority without THREAD, conflicting with their thread-local header declarations; those test/header files match the unmodified 2.19.0 release tarball.

Thus the complete standard upstream test-all suite passes on both platforms. The extra targets are not all green, with the qualifications above; they should not be conflated with a successful test-all run.

@dimpase dimpase added the pr-pull label Oct 4, 2026
@github-actions
github-actions Bot deleted the fix/pari-complex-pivot branch October 4, 2026 01:19
@github-actions github-actions Bot closed this in d0d7cf0 Oct 4, 2026
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.

1 participant