Skip to content

Read the incomplete gamma function in the precise evaluation - #2091

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
the-precise-evaluation-reads-the-incomplete-gamma-function
Oct 23, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
the-precise-evaluation-reads-the-incomplete-gamma-function

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The checks at sampled points now evaluate gamma(a, z), so the routes that check their answer that way stop turning away every answer holding one. Part of #2075.

The defect. A route that checks its answer compares the answer's derivative with the integrand at sampled points. It does so in intervals, doubles first and then forty and eighty digits. Neither tier read gamma(a, z). A point where either side holds one had no value and was skipped, and with fewer than two points left the check failed. The inverse hyperbolic substitution, for one, answered x arsinh(a x)^n/sqrt(1 + a^2 x^2) as two gamma functions of u = arsinh(a x), then declined its own answer.

The change. The forty- and eighty-digit tier reads it, as it reads the other special functions: the value at the middle of the argument's rectangle, widened by the derivative in z, -z^(a - 1) e^(-z), over the rectangle. Its cut is the negative real axis, except at a whole order a >= 1. The power is the principal one, as that tier's powers are (#2089 is about those). An order known only to its last place, as 1/3 is, is taken at both ends, and the value is the hull of the two.

Measured on Rubi's suite, with the harness that reads GAMMA, against this branch's base 68211405, the whole corpus each side:

68211405 this
solved 48,907 of 49,052 48,961
wrong 0 0
timeouts 7 7
rows lost 0

The 54 gains are rows whose route had the answer and its check could not read it: 7.2.4 (15), 7.1.4 (12), 7.1.2 (5), 7.2.2 (5), 3.2.2 (4), 7.1.5 (3), 7.2.5 (3), 2.1 (3), 3.1.4 (2) and 8.6 (2).

The harness checks each answer again at 300 and 2000 digits, and for the 7.2.4 rows that is most of their time, up to 22 s.

The times per stream, 1.08, 1.07 and 1.10 of the base's, were taken with other builds running. Rational functions (fam1), which hold no gamma function to check, are among them at 1.08, with allocation equal to 1.0001. Allocation is 1.0000 and 0.9748 in the other two streams. Two rows' allocation grew in the run, 7.4.2:619 and 8.1:106. Alone they are the same on both builds: 0.403 GB, and 0.449 GB.

Tests: the precise interval holds gamma(a, z)'s value, a derivative keeping one is checked, and three of the integrals differentiate back. The suite passes (16,953), and so do the MCP tests (329).

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

The routes that check their answer at sampled points compare an antiderivative's derivative with
the integrand in intervals, doubles first and then forty and eighty digits. Neither tier read
gamma(a, z). A point where either side holds one has no value and is skipped, and with fewer than
two points left the check fails. So every such route turned away every answer holding a gamma
function. The inverse hyperbolic substitution answered x arsinh(a x)^n/sqrt(1 + a^2 x^2) as
(gamma(n + 1, u) - u^(n + 1) (-u)^(-(n + 1)) gamma(n + 1, -u))/(2 a^2) with u = arsinh(a x), and
then declined its own answer.

The forty- and eighty-digit tier now reads it, as it reads the other special functions: the value
at the middle of the argument's rectangle, widened by the derivative in z, -z^(a - 1) e^(-z), over
the rectangle. Its cut is the negative real axis, except at a whole order a >= 1. The power is the
principal one, as that tier's powers are. An order known only to its last place, as 1/3 is, is
taken at both ends, and the value is the hull of the two.

On Rubi's 7.1.4 and 7.2.4 that is the files' last 27 problems, all at a symbolic power: 610 of
637 solved before, 637 now, 0 wrong. Tests: the precise interval holds gamma(a, z)'s value, a
derivative keeping one is checked, and three of the integrals differentiate back.

Part of #2075.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Oct 23, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit c831255 into master Oct 23, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant