Skip to content

Consolidate the compensated arithmetic into one header - #1576

Merged
NAThompson merged 1 commit into
developfrom
consolidate-eft
Oct 14, 2026
Merged

NAThompson merged 1 commit into
developfrom
consolidate-eft

Conversation

@NAThompson

@NAThompson NAThompson commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Jacobi theta, Kolmogorov-Smirnov, ibeta, 2F0, laguerre, gauss_hermite and the discrete entropies share two_product, two_sum_error, difference_of_products and compensated_sum. Products whose errors are tracked now come from two_product, so contraction can't fuse them: the Kolmogorov-Smirnov pdf's worst error falls from 253 to 3.4 eps; other results are bitwise identical. The header forbids reassociation, so the compensations survive -ffast-math.

Kolmogorov-Smirnov pdf in double, error in ulps against cpp_bin_float_50 (develop left, this PR right):

ks pdf ulps

🤖 Generated with Claude Code

@NAThompson NAThompson changed the title Consolidate the error-free transforms into one header Consolidate the compensated arithmetic into one header Oct 14, 2026
@NAThompson
NAThompson force-pushed the consolidate-eft branch 3 times, most recently from 10aea0d to db014da Compare October 14, 2026 04:15
NAThompson added a commit to NAThompson/math that referenced this pull request Oct 14, 2026
@NAThompson

Copy link
Copy Markdown
Collaborator Author

@evanmiller : Heads up.

Jacobi theta, Kolmogorov-Smirnov, ibeta, 2F0, laguerre, gauss_hermite and the discrete entropies share two_product, two_sum_error, difference_of_products and compensated_sum. Products whose errors are tracked now come from two_product, so contraction can't fuse them: the Kolmogorov-Smirnov pdf's worst error falls from 253 to 3.4 eps; other results are bitwise identical. The header forbids reassociation, so the compensations survive -ffast-math.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NAThompson
NAThompson merged commit a6849b5 into develop Oct 14, 2026
96 of 97 checks passed
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.

1 participant