HyperPrecisionAsir is an independent Risa/Asir implementation for complete
Horn-type multivariate hypergeometric series. It follows the method of
Banik--Bera, HyperPrecision
(arXiv:2605.30216v2). The algebraic
frontend constructs annihilating partial differential equations from neighboring
coefficient ratios. Exact repeated differentiation and Gaussian elimination give
a full Pfaffian connection
The numerical layer first dispatches a predefined function to a term recurrence, a total-degree convolution, a neighbor-ratio shell recurrence, or Pfaffian continuation. It restricts a full Pfaffian connection to a piecewise-linear path and transports a factorized full fundamental matrix by local Taylor series. Based closed paths give numerical monodromy matrices. The implementation uses Risa/Asir for symbolic computation and MPFR midpoint arithmetic. It does not require Mathematica, FiniteFlow, or AMFlow.
For Appell's function
and holonomic rank
The current implementation provides the following functions.
- It represents a general complete Horn series with arbitrary integral weights, including negative Pochhammer indices.
- It constructs neighboring coefficient ratios and Euler-type annihilating partial differential equations.
- It prolongs the partial differential equations by Euler derivatives and uses exact Gaussian elimination over a rational-function field.
- It extracts a finite derivative basis, the holonomic rank, and the full Pfaffian connection.
- It verifies the flatness equations of the full Pfaffian connection exactly.
- It supports directly supplied full Pfaffian connections.
- It provides constructors for generalized
${}_pF_q$ , Appell F1–F4, Horn G1–G3 and H1–H7, and Lauricella$F_A$ –$F_D$. - It evaluates
${}_pF_q$ by an$O((p+q+1)D)$ term recurrence and routes${}_2F_1(1/2,1/2;1;z)$ to an arithmetic-geometric mean recurrence on its principal interior branch. - It evaluates Lauricella
$F_A$ ,$F_B$ , and$F_C$ by$O(nD^2)$ total-degree convolutions. Appell F2–F4 use the corresponding two-variable kernels, and Appell F1 uses the$F_D$ kernel. - It evaluates Horn G1–G3 and H1–H7 by bivariate neighbor-ratio shells and uses exact Gauss reductions on coordinate axes.
- It evaluates Lauricella
$F_D$ by a grouped total-degree recurrence or by a closed rank-$(n+1)$ Pfaffian connection, without generic multi-index enumeration or generic rational-function elimination. - It selects the predefined method by convergence and operation gates and
admits explicit
series,pfaffian,agm, orautorequests where the method applies. - It selects the Lauricella
$F_D$ method by measured cost gates and admits an explicitseries,pfaffian, orautomethod. - It rejects a generic exact prolongation before RREF when a rectangular monomial estimate exceeds two million matrix cells.
- It extracts singular factors from the denominators of the full Pfaffian connection and computes the restricted singularities of a path segment.
- It constructs canonical paths, conservative
safe_optpaths, sampledfast_optpaths, and user paths. - It transports all columns of a full fundamental matrix and stores the local
matrices as a
FactorizedFundamentalTransportobject. - It compares Taylor orders
$N$ and$N+4$ , evaluates a differential residual, performs an independent reverse-path check, and records precision escalation. - It constructs one-variable based loops, coordinate loops, and multivariate meridian loops.
- It returns a numerical monodromy representation with its basepoint, derivative basis, generators, matrices, and computation history.
- It evaluates a distinguished Horn-series solution from a series boundary vector and reconstructs epsilon Laurent coefficients by a Cauchy grid.
- It provides an arithmetic-geometric mean evaluator for an independent Gauss
${}_2F_1$ regression.
The source files require Risa/Asir with MPFR support. If asir is on PATH, run
asir -quiet -f test/runtests.rr
The test runners use the following pinned public container image by default.
ghcr.io/nakanoryunosuke/risa-asir-container@sha256:a572b603f710167f708e976900ba883b44c03ecf51378e87a796b7b127bf0aed
For example, run the regular tests in Docker by
docker run --rm -v "$PWD:/workspace" -w /workspace \
ghcr.io/nakanoryunosuke/risa-asir-container@sha256:a572b603f710167f708e976900ba883b44c03ecf51378e87a796b7b127bf0aed \
asir -quiet -f test/runtests.rrThe environment variable RISA_ASIR_IMAGE replaces the default image used by
the test and benchmark runners.
The file src/hyperprecision.rr includes its predefined numerical layer by a
quoted source-relative include. Thus an absolute load of
src/hyperprecision.rr also works when the current directory is not the
repository root.
The following computation constructs the full Pfaffian connection of Appell's
function
load("src/hyperprecision.rr")$
setprec(55)$
H = hp_appell_f2(2,3/2,5/4,4,7/3,m,n,x,y)$
PF = hp_pfaffian(H,[tx,ty],2)$
print(hp_pfaffian_summary(PF))$
R = hp_transport(H,PF,[1/10,1/5],s,0,1/64,
26,28,50,24,16)$
print(R[0])$
The following computation evaluates a seven-variable Lauricella function. The report records the selected method, the truncation degree, and the number of generic terms avoided.
A = 1/4$
B = [1/4,1/5,1/6,1/7,1/8,1/9,1/10]$
C = 5/4$
X = [1/2,2/5,1/3,1/4,1/5,1/6,1/7]$
R = hp_lauricella_fd_eval_report(A,B,C,X,"auto",18)$
print(R)$
The result of hp_transport has the form
[function_value, final_basis_vector, ode_error_estimate,
boundary_shell_estimate, accepted_frobenius_leaf_count,
boundary_series_seconds, transport_seconds]
Thus R[5] measures the boundary-series construction and R[6] measures the
subsequent numerical transport. Public predefined evaluation reports have the
separate shape [value, method, metadata]; the flat diagnostics are the
key–value records described below.
Derivative reports have the shape
[value, derivatives, method, metadata], where derivatives contains all
ordinary first derivatives in target-coordinate order. Their flat diagnostics
contain the scalar fields together with derivatives,
derivative_error_estimates, error_status, path_provenance,
working_precision, and resource_admission. A derivative diagnostic calls
one derivative report; it does not issue a second derivative evaluation.
The following computation transports a full fundamental matrix and computes a
Gauss monodromy matrix about
G = hp_gauss_2f1(1/3,1/4,7/6,m,z)$
PG = hp_pfaffian(G,[tz],2)$
Path = hp_plan_path(PG,[1/5],[1/2],"principal","safe_opt",50)$
T = hp_transport_fundamental(PG,Path,s,18,50,12,500,"fast")$
U = hp_factorized_materialize(T)$
print(hp_factorized_diagnostics(T))$
Loop = hp_univariate_loop(PG,[1/5],1,1/8,10,"around_1",50)$
Rho = hp_monodromy(PG,[Loop],s,18,50,12,1000,"fast")$
M1 = hp_monodromy_matrix(Rho,["L",1])$
The unified dispatcher accepts a family name, a parameter list, a target list,
a method, a decimal precision, and a polynomial-detour parameter. The following
calls use the generalized hypergeometric recurrence, the Appell
P = hp_predefined_diagnostics(
"HypergeometricPFQ",[[1,1],[2]],[1/2],"auto",30,0
)$
A = hp_predefined_diagnostics(
"AppellF2",[1/3,2/5,3/7,5/6,7/8],
[1/10,1/20],"auto",30,0
)$
H = hp_predefined_diagnostics(
"HornH3",[1/3,2/5,5/6],[1/50,3/200],"auto",30,0
)$
Each flat diagnostic record contains value, family, method_used, degree,
error_estimate, elapsed_seconds, compressed_dimension, and metadata.
The nested metadata records the recurrence, convergence test, operation count,
working precision, and branch detour used by the selected method.
For generalized hypergeometric functions, we set
Thus a truncation through degree
The public constructor hp_bf(X,Prec) retains bounded provenance when an exact
nonreal complex input is converted to MPFR. Hence a later evaluator can recover
both the exact distance from a nonpositive integer and the source precision.
The registry contains at most 64 rounded values. If distinct exact sources
round to the same value, it retains the closest near-pole witness and the
largest source precision, so a collision cannot decrease either guard. The
real recurrence hot path does not query this registry. A bigfloat created
outside hp_bf has no recoverable per-object precision in the Risa/Asir
language; its metadata reports source_precision_digits=0.
For Lauricella
The nonterminating kernels compare degrees Delta
activates every coordinate on the polynomial detour, so zero-coordinate
compression is deliberately disabled for that path.
Horn G1–G3 and H1–H7 use uncanceled neighboring coefficient ratios, except
that an identical upper/lower parameter pair with an identical weight row is
canceled exactly before dynamic guard selection. The implementation sums
complete total-degree shells and
compares degrees
Each public predefined evaluator rounds its value to the requested decimal
precision with two output guard digits. The metadata contains output_digits,
output_guard_digits, output_rounding_error, precision_stability_error, and
an error_estimate_kind label. The total error_estimate includes the observed
output-rounding change.
A nonzero Delta always selects Pfaffian continuation. The dispatcher does not
replace such a request by a principal defining series, an arithmetic-geometric
mean recurrence, or a terminating-polynomial shortcut. The sign and magnitude
of Delta are retained in the report. The automatic dispatcher does not enable
Euler, Laplace, Bessel, or Mellin–Barnes integrals.
Automatic production dispatch uses predicted arithmetic work before it starts a
series or an exact Pfaffian construction. For ${}pF{p-1}$, the model compares
the predicted dispatch_reason,
projected_series_operations, pfaffian_crossover_operations, and
resource_admission.
The exact-system cache stores at most eight Pfaffian systems. It does not store
function values, boundary vectors, transports, or error checks. Thus a second
target with the same exact parameters reuses Macaulay/RREF construction and
still performs the complete numerical computation. The function
hp_fast_clear_system_cache() clears this cache. Pfaffian reports separate
pfaffian_build_seconds, boundary_series_seconds, and transport_seconds,
and they state whether the exact system was found in the cache.
We group the Lauricella
By logarithmic differentiation, we have
Thus the implementation computes a degree-$D$ truncation in
The quantity
The adaptive stopping test requires this upper bound to be less than one and uses the resulting geometric bound for the complete omitted tail. Thus a few small shells before a near-pole amplification cannot trigger termination.
The function hp_lauricella_fd_pfaffian(A,B,C,Variables) gives the connection
with respect to the basis
The constructor uses the closed Lauricella differential equations and does not
call hp_prolong_relations or hp_rref. Its holonomic rank is
The functions hp_lauricella_fd_eval and hp_lauricella_fd_eval_report accept
"series", "pfaffian", and "auto". A nonterminating series call requires
pfaffian convenience method uses a
radial path in the interior and a default polynomial detour outside the
defining polydisc. The
ordinary-derivative chart requires pairwise distinct target coordinates. The
lower-level path API admits other nonsingular paths. The
auto method uses the grouped series on inexpensive interior points and uses
the closed Pfaffian connection near the boundary or outside the defining
polydisc. If auto evaluates the terminating
series through degree auto or series route first cancels the common parameter and uses
The cancellation also applies when the common parameter is a nonpositive
integer: it is performed before the lower-pole test. The product is restricted
to the principal germ. A branch-specific request or
a nonterminating target outside the defining polydisc retains Pfaffian
continuation. For such an outside target, the convenience method adds an
upper-half-plane polynomial detour with Delta=1/20; the report records this
choice. The function hp_lauricella_fd_eval_report_with_delta preserves a
user-specified sign and magnitude of Delta. Equal coordinates inside the
polydisc are combined by adding their auto request and a forced
series request enter the same reduced pFq kernel without rebuilding an
auto uses the grouped series because
the ordinary-derivative connection contains the factors Delta path.
When auto or series evaluation
removes the common parameter from the dynamic magnitude guard and uses the
endpoint product; an explicit series request retains series as its reported
method. An explicit Pfaffian or
nonzero-Delta request retains both the full continuation guard and the
requested path in its report.
The flat report returned by hp_lauricella_fd_diagnostics contains value,
method_used, degree, error_estimate, elapsed_seconds, and
compressed_dimension. For the grouped series, error_estimate is the scalar
tail majorant or the doubled-degree difference reported by the corresponding
convergence test. For Pfaffian continuation, it is the maximum of the accepted
local ODE term estimate and the boundary-shell estimate. The nested metadata
entry retains the method-specific data.
The evaluator compares raw coordinates before conversion to MPFR values.
Therefore, exact equal coordinates are combined and distinct exact coordinates
are retained. The working precision includes guard digits determined by the
decimal orders of the parameters and the nonzero coordinate separations. If
the absolute-parameter tail majorant is too large, auto compares two fixed
grouped sums after the degree has passed the possible amplification near
doubled_degree. A rejected
comparison falls back to the closed Pfaffian connection, and the metadata
records fallback_from and fallback_reason.
The generic Horn evaluator rejects a truncation with more than auto changes to the closed Pfaffian connection when
the ordinary-derivative chart is nonsingular. The pinned Risa/Asir runtime does
not expose a native adaptive quadrature callback for an Asir function.
Therefore, auto selects between the measured grouped-series and
closed-Pfaffian paths; it does not run an interpreted quadrature loop.
The function hp_horn represents the series
The corresponding Risa/Asir input is
H = hp_horn(
[a,b1,b2],
[[1,1],[1,0],[0,1]],
[c1,c2],
[[1,0],[0,1]],
[m,n],
[x,y]
)$
The functions hp_neighbor_ratios(H) and hp_pde_generator(H,[tx,ty])
return the neighboring coefficient ratios and the annihilating partial
differential equations. For each coordinate hp_pde_generator returns
[g_i(m),h_i(m),L_i(theta)], where
The factors
The main algebraic APIs are as follows.
| API | Operation |
|---|---|
hp_horn(A,Mu,B,Nu,Indices,Variables) |
Construct a Horn series |
hp_hypergeometric_pfq(Upper,Lower,m,z) |
Construct a generalized hypergeometric series |
hp_gauss_2f1(...) |
Construct Gauss |
hp_appell_f1(...)–hp_appell_f4(...)
|
Construct Appell F1–F4 |
hp_horn_g1(...)–hp_horn_g3(...), hp_horn_h1(...)–hp_horn_h7(...)
|
Construct Horn G1–G3 and H1–H7 |
hp_lauricella_fa(...)–hp_lauricella_fc(...)
|
Construct Lauricella |
hp_lauricella_fd(...) |
Construct Lauricella |
hp_pfq_eval(...) |
Evaluate |
hp_appell_f1_eval(...)–hp_appell_f4_eval(...)
|
Evaluate an Appell function through a specialized Lauricella alias |
hp_horn_g1_eval(...)–hp_horn_g3_eval(...), hp_horn_h1_eval(...)–hp_horn_h7_eval(...)
|
Evaluate a named Horn function by shells or continuation |
hp_lauricella_fa_eval(...)–hp_lauricella_fc_eval(...)
|
Evaluate Lauricella |
hp_predefined_eval(...) |
Evaluate a named predefined family through one dispatcher |
hp_predefined_diagnostics(...) |
Return the common flat diagnostic record |
hp_predefined_derivative_eval_report(...) |
Return a value and all first derivatives through one dispatcher |
hp_predefined_derivative_diagnostics(...) |
Return the common flat derivative diagnostic record |
hp_pfq_derivative_eval_report(...) |
Return |
hp_pfq_derivative_diagnostics(...) |
Return the flat |
hp_appell_f1_derivative_eval_report(...)–hp_appell_f4_derivative_eval_report(...)
|
Return an Appell value and both first derivatives |
hp_appell_f1_derivative_diagnostics(...)–hp_appell_f4_derivative_diagnostics(...)
|
Return a flat Appell derivative diagnostic record |
hp_lauricella_fa_derivative_eval_report(...)–hp_lauricella_fd_derivative_eval_report(...)
|
Return a Lauricella value and all first derivatives |
hp_lauricella_fa_derivative_diagnostics(...)–hp_lauricella_fd_derivative_diagnostics(...)
|
Return a flat Lauricella derivative diagnostic record |
hp_horn_derivative_eval_report(...) |
Return a named Horn value and both first derivatives |
hp_horn_derivative_diagnostics(...) |
Return a flat named-Horn derivative diagnostic record |
hp_lauricella_fd_series_value(...) |
Evaluate |
hp_lauricella_fd_pfaffian(...) |
Construct the closed rank-$(n+1)$ connection |
hp_lauricella_fd_eval(...) |
Evaluate auto, series, or pfaffian
|
hp_lauricella_fd_eval_report(...) |
Evaluate |
hp_lauricella_fd_diagnostics(...) |
Return flat value, method, error, timing, and dimension diagnostics |
hp_lauricella_fd_eval_report_with_limit(...) |
Evaluate |
hp_lauricella_fd_eval_report_with_delta(...) |
Continue |
hp_neighbor_ratio(H,i) |
Compute a neighboring coefficient ratio |
hp_pde_generator(H,Theta) |
Construct Euler-type annihilators |
hp_prolong_relations(H,Theta,Depth) |
Prolong the annihilators |
hp_pfaffian_resource_estimate(H,Theta,Depth) |
Estimate generic exact matrix cells before prolongation |
hp_pfaffian(H,Theta,Depth) |
Construct the full Pfaffian connection |
hp_user_pfaffian(Basis,Variables,Omegas) |
Construct a directly supplied connection |
hp_check_integrability(PF) |
Verify flatness exactly |
hp_holonomic_rank(PF) |
Return the rank |
hp_singular_factors(PF) |
Extract singular factors |
hp_restricted_singularities(PF,Paths,t,Prec) |
Compute restricted singularities |
The unified constructor, scalar evaluator, and derivative evaluator use one
canonical schema validator. HypergeometricPFQ takes [upper,lower], where
both entries are scalar parameter lists, and Gauss2F1 takes [a,b,c]; their
targets have dimension one. Appell F1 and F4 take four scalar parameters,
whereas F2 and F3 take five; their targets have dimension two. Lauricella
[a,b-list,c-list], [a-list,b-list,c], [a,b,c-list], and
[a,b-list,c], respectively, with every list matching the target dimension.
Horn G1–G3 take 3, 4, and 2 scalar parameters. Horn H1–H7 take 4, 5, 3, 4,
3, 3, and 4 scalar parameters. A wrong arity, a misplaced scalar/list group,
or a target-dimension mismatch raises an explicit schema error before an
evaluator indexes the supplied parameters.
Risa/Asir matrices use zero-based indices. In a Pfaffian object, PF[1] is the
derivative basis, PF[2] is the list of connection matrices, and PF[7] is the
list of variables.
Path restriction uses simultaneous substitution through fresh placeholders. A system variable that has the same name as a path parameter is not captured by a later substitution. Restricted polynomial roots are computed after normalization by the leading coefficient. The solver checks iteration convergence and the residual of every root against the original nonmonic polynomial. A singular factor that vanishes identically on a path is rejected.
The following constructor defines a full Pfaffian connection supplied by a user.
Omega = matrix(1,1)$
Omega[0][0] = 1/(3*(1-z))$
P = hp_user_pfaffian([[0]],[z],[Omega])$
Exact rational inputs such as 1/10 retain the requested working precision. A
machine double such as 0.1 does not recover its lost digits when Prec is
increased.
A path object has the form
["PiecewiseLinearPath", vertices, path_class, planner, metadata]
The planner API is
Path = hp_plan_path(PF,Start,Target,PathClass,Planner,Prec)$
The planners have the following meanings.
canonicalreturns a deterministic coordinate-by-coordinate reference path.safe_optreturns the canonical path without modification. Its metadata recordshomotopy_status="not_certified_no_change".fast_optsamples the strip between the direct path and the canonical path. It can accept the direct path when the sample avoids the singular factors and the predicted restricted-root step count does not increase. This finite sampling does not certify the path class.hp_user_path(Vertices,PathClass)stores a user path and its path class without modification.
For example, the following two paths have the same complex endpoint.
P1 = hp_plan_path(PF,[1/5],[1/2+@i/10],
"principal","safe_opt",50)$
P2 = hp_user_path([[1/5],[2/5+@i/20],[1/2+@i/10]],
"principal")$
The metadata of a shortcut accepted by fast_opt contains
homotopy_status="sampled_only_not_certified" and certified=0. The automatic
meridian connector uses the canonical path. It does not select a fast_opt
shortcut implicitly.
The earlier distinguished-solution API remains available. The call
hp_transport(H,PF,Target,t,Delta,T0,Cutoff,
Order,Prec,GoalDigits,MaxSplit)$
uses a radial path when Delta=0. A nonzero value of Delta adds the polynomial
detour
The sign of Delta selects the side of a real singular locus. A negative value
corresponds to the default IDelta -> -I convention in the reference paper.
The full fundamental transport API is
T = hp_transport_fundamental(PF,Path,t,Order,Prec,
GoalDigits,MaxSteps,"fast")$
At an ordinary center, the algorithm expands
and computes
The local step is at most two thirds of the distance to the closest restricted
singularity. The algorithm compares orders
The result has the form
["FactorizedFundamentalTransport",
start, end, rank, local_factors, path, history, diagnostics, mode]
The local factors are stored in traversal order. The function
hp_factorized_apply(T,V) applies the local factors successively to a vector.
The function hp_factorized_materialize(T) returns their matrix product. The
function hp_factorized_inverse(T) reverses and inverts the local factors.
This algebraic inverse records reverse_error=-1 and
reverse_check="not_checked"; it is not an independently transported reverse
path.
The computation history of each local factor contains the path segment, local parameter interval, Taylor order, working precision, order-comparison error, differential residual, restricted radius, and number of step halvings. The transport diagnostics contain the maximum local error, accepted step count, reverse-path error, and precision-escalation count.
The reverse-path error is computed from an independent transport along the reversed geometric path. It measures
If this error exceeds the requested threshold, the fast mode repeats the forward and reverse transports once with 20 additional working digits and four additional Taylor orders.
The standard monodromy computation transports a full fundamental matrix around a based closed path. It does not replace a resonant closed-path transport by the exponential of a residue matrix.
For a one-variable singularity hp_univariate_loop connects
the basepoint to a polygon centered at
Loop = hp_univariate_loop(PF,Base,s,Radius,Sides,PathClass,Prec)$
Rho = hp_monodromy(PF,[Loop],t,Order,Prec,
GoalDigits,MaxSteps,"fast")$
M = hp_monodromy_matrix(Rho,["L",1])$
For a multivariate singular factor hp_meridian_generator restricts
The function tests every polygon edge by restricting every singular factor to
the edge. It also tests radial spokes for enclosed foreign components and
additional germs of the target component. The function reduces the meridian
radius until these tests pass. The following code constructs a meridian of the
divisor
Factors = hp_singular_factors(PF3)$
IX = hp_find(Factors,x-1)$
G = hp_meridian_generator(PF3,[1/5,1/7],IX,1/8,8,50)$
Rho = hp_monodromy(PF3,[G],s,18,50,12,1500,"fast")$
Mx1 = hp_monodromy_matrix(Rho,["D",IX+1])$
The function hp_meridian_generators constructs several meridians from a list
of component indices or from the string "all". A numerical monodromy
representation has the form
["NumericalMonodromyRepresentation",
basepoint, basis, generators, matrices, verified_relations,
generator_set_complete, history, mode]
The value of generator_set_complete is "unknown". The automatic meridians
are not asserted to give a presentation of the full fundamental group.
Before transport, hp_monodromy requires exact flatness, at least one loop,
closed paths of the correct dimension, a common numerical basepoint, and unique
generator labels.
The functions hp_matrix_trace, hp_matrix_determinant, and
hp_projective_distance provide numerical matrix invariants.
The PowerShell test commands are
powershell -ExecutionPolicy Bypass -File .\run-tests.ps1
powershell -ExecutionPolicy Bypass -File .\run-tests.ps1 -Monodromy
powershell -ExecutionPolicy Bypass -File .\run-tests.ps1 -Extended
powershell -ExecutionPolicy Bypass -File .\run-tests.ps1 -AllThe corresponding POSIX commands are
sh ./run-tests.sh
sh ./run-tests.sh --monodromy
sh ./run-tests.sh --extended
sh ./run-tests.sh --allThe regular test suite verifies Horn ratios, annihilators, full Pfaffian
connections for Appell functions F1–F4, exact flatness, distinguished-solution
transport, epsilon reconstruction, and the arithmetic-geometric mean regression.
It also verifies the seven-variable Lauricella diagonal reduction, an ordinary
derivative identity, the closed rank-eight constructor, and agreement between
the grouped series and the closed Pfaffian transport at a shared distinct point.
The default runner also executes test/general_hypergeometric_fast.rr,
test/production_dispatch.rr, and test/phase3_derivatives.rr. The production
regression verifies the measured
one- and two-variable crossovers, exact-system cache behavior, separated
Pfaffian timings, the /tmp. The suite also checks that a generic
seven-variable
The Phase 3 regression checks the negative-integer hp_bf parameter at distance
The monodromy test suite verifies the following computations.
- Simultaneous substitution preserves a path parameter, and the verified root
solver obtains the roots
$1/2$ and$1$ of$2t^2-3t+1$ . - Noncommuting rank-two local factors are multiplied in traversal order.
- A directly supplied rank-one connection reaches a complex target along a canonical path and a user path.
- The Appell
$F_2$ safe_optpath equals the canonical path, while an explicitly requestedfast_optpath uses fewer measured local Taylor steps. - The Gauss
${}_2F_1$ monodromy about$z=1$ has the expected trace and determinant. - The resonant Appell function
$F_3(1,1,1,1;2;x,y)$ has nonidentity unipotent monodromy about$x=1$ , including the numerical relation$(M-I)^2=0$ . - Open paths, mixed basepoints, duplicate labels, nonflat connections, invalid loop geometry, and identically singular restrictions are rejected.
- The meridian regression for the factors
$x$ and$16x-y-1$ forces radius reduction when the foreign divisor crosses a radial spoke. - The Lauricella function
$F_D^{(3)}$ gives a flat full Pfaffian connection of rank$4$ .
Run the wall-time benchmark by
powershell -ExecutionPolicy Bypass -File .\run-benchmarks.ps1
powershell -ExecutionPolicy Bypass -File .\run-production-benchmarks.ps1The first command runs the regular benchmark set. The second command also runs
the 15-, 50-, and 100-digit production portfolio. It reports the median of five
container-plus-empty-Asir startup samples separately from source loading and
warm numerical kernels. The first paired index contains every admitted forced
method and auto, and the first method rotates with the sample index. Thus
host-load drift is shared across the methods. After that first index, a forced
candidate that exceeds five seconds and is not the fastest forced method keeps
one complete warm sample. The fastest forced method and auto retain at least
five paired samples. A nonfastest candidate in the 4.5--5-second boundary band
retains one full five-sample round; this prevents a small host-speed change from
expanding a three-round measurement abruptly. The benchmark prints all
medians, sampling policies, sample counts, and paired samples before it
evaluates the timing gate. At 50 digits, competitive candidates use three
rounds of five paired samples and the median of the three round medians. The
admitted or resource_rejected; a hard resource refusal is not reported as
inapplicable. An admitted long-running candidate retains one complete warm
sample. Scalar and derivative workloads are measured separately with five
paired, alternating warm samples at each requested precision.
The benchmark runner includes benchmark/general_hypergeometric_fast.rr.
Every dispatch gate uses warmed calls and requires
where the index
The production portfolio retains auto and the fastest forced candidate use five
paired samples, while a slower forced candidate above five seconds keeps one
complete sample. The timing gate is applied directly to this
All wall times in this section depend on the host. On 2026-08-20, the pinned image gave a 0.447-second median for container plus empty-Asir startup and 0.0679 seconds for source loading. The production portfolio gave the following warm medians. Each row passed the dispatch gate.
| Workload | 15 digits | 50 digits | 100 digits |
|---|---|---|---|
| Generic |
0.0188 s, series
|
0.0309 s, series
|
0.0603 s, series
|
| Generic |
0.477 s, pfaffian, |
1.62 s, pfaffian, |
0.598 s, series, |
| Appell |
0.421 s, pfaffian
|
3.98 s, pfaffian
|
23.9 s, pfaffian
|
| Appell |
0.292 s, pfaffian
|
2.55 s, pfaffian
|
20.0 s, pfaffian
|
| Horn |
0.191 s, pfaffian
|
1.89 s, pfaffian
|
17.1 s, pfaffian
|
| Seven-variable diagonal |
0.00943 s, series
|
0.0215 s, series
|
0.0384 s, series
|
At 15 digits, the main checkout selected series for the main checkout and this branch at five paired sample
indices on the same host. Each sample uses one warmed Asir runtime per checkout,
and the checkout order alternates with the sample index. The internal timer
excludes container startup and source loading. The following checkout medians
are host-dependent.
| 15-digit workload |
main checkout |
Current branch |
main / current |
|---|---|---|---|
| Appell |
7.40 s, series
|
0.821 s, pfaffian
|
9.02 |
| Horn |
2.26 s, series
|
0.336 s, pfaffian
|
6.72 |
At 100 digits, the F2, F4, and H3 series estimates exceed their family-specific admission limits. Their rows compare forced Pfaffian and automatic calls at each of the same five sample indices. On 2026-08-20, one pinned-container run gave the following warm medians.
| Workload | Forced method | auto |
Selected method |
|---|---|---|---|
| Gauss |
0.0000861 s (AGM) | 0.0000920 s | agm |
| Appell |
0.0181 s | 0.0172 s | series |
| Horn |
0.152 s | 0.151 s | series |
| Three-variable Lauricella |
0.0194 s | 0.0231 s | series |
At the Appell
On 2026-08-19, the pinned container completed the unchanged regular regression
suite in 6.018 seconds. The monodromy regression suite, including the explicit
differential-residual and meridian-edge checks, completed in 33.267 seconds. The
measured Appell
fast_opt path.
The fast_opt reverse-path error was less than
The Lauricella benchmark uses the same parameters and target as the quick-start
example at 18 requested digits. On 2026-08-19, 20 closed rank-eight
constructions required 9.46 seconds, or 0.473 seconds per construction. Twenty
grouped-series evaluations required 0.203 seconds, or 0.0101 seconds per
evaluation. The warm medians were 0.01108 seconds for forced series and
0.01462 seconds for auto; auto selected series. One closed-Pfaffian
transport required 4.61 seconds. The two values differed by
benchmark/lauricella_fd7.rr and is included in
run-benchmarks.ps1.
The extended test reproduces the epsilon Laurent coefficients of the paper's
Appell
The pinned container gives
epsilon^-1 0.5149686368228051 - 6.97e-11 i
epsilon^0 0.5286628168944232 - 4.194390017098441 i
epsilon^1 -10.97813788622874 - 4.834942153461091 i
The paper gives 0.5149686376, 0.528662817 - 4.194390019 i, and
-10.978138236 - 4.834942296 i, respectively.
The independent arithmetic-geometric mean test uses
The regular test suite includes
The fast mode uses arbitrary-precision MPFR midpoint arithmetic. It records the
following diagnostics.
- It compares local Taylor orders
$N$ and$N+4$ . - It evaluates the last Taylor term and a differential residual.
- It limits each local step by the restricted singularities.
- It transports the reversed path independently.
- It increases the working precision and Taylor order once when the reverse-path threshold fails.
The function hp_numerical_capabilities() returns the corresponding capability
flags.
The fast mode does not provide a rigorous enclosure. Its errors are midpoint
diagnostics, not certified bounds.
The predefined series layer follows the same convention. The
The certified mode is not implemented. Risa/Asir does not provide the complex
ball arithmetic, restricted-root ball isolation, coefficient balls, and tail
bounds required by this mode. A request for "certified" raises an explicit
error. The function hp_certified_mode_available() returns 0.
The safe_opt planner leaves the canonical path unchanged because midpoint
sampling cannot certify a path class. The fast_opt planner can use a midpoint
sampling test, and its metadata records certified=0.
- The algebraic frontend assumes a complete Horn system of finite holonomic rank. It does not prove completeness or the convergence domain.
- Automatic named-Horn series dispatch uses a conservative interior measure. A rejected point can still belong to the mathematical convergence domain.
- The exact named-Horn polynomial test uses terminating upper rows with nonnegative weights. A terminating mechanism that requires a cancellation among signed-weight rows is not inferred automatically.
- Generic Pfaffian construction uses a rectangular monomial estimate with a two-million-cell limit. The estimate prevents large exact RREF jobs; it is not an estimate of the holonomic rank.
- Automatic dispatch does not use Euler, Laplace, Bessel, or Mellin–Barnes integral representations. These methods are not enabled without a precision-controlled backend and branch-path diagnostics.
- Generic Pfaffian continuation for generalized hypergeometric functions
requires
$p=q+1$ . The recurrence also evaluates convergent cases with$p\leq q$ and every terminating polynomial. - Precision stability is tested up to 4096 working digits. The evaluator raises an error when a finite or near-pole sum does not stabilize before this cap.
- The prolongation depth
Depthis a user parameter. A larger depth can cause expression swell in exact rational-function elimination. - The implementation uses Risa/Asir exact Gaussian elimination. It does not use FiniteFlow-style modular reconstruction.
- The local Frobenius method treats an ordinary point with exponent zero. It does not construct generalized Frobenius or Levelt bases at a singular point.
- The
safe_optplanner does not shorten the canonical path without an interval or exact homotopy certificate. - The
fast_optplanner uses a finite strip sample and compares the direct path with the canonical path. It does not prove a path-class identity, construct a PRM/A* candidate graph, or move general waypoints. - The automatic meridian search requires an isolated smooth point visible on a coordinate line through the basepoint. It does not search arbitrary transverse directions.
- The automatic meridians do not certify a complete generator set. Braid generators and a presentation of the fundamental group are not constructed.
- Invariant Hermitian forms, invariant bilinear forms, relation-word certification, and algebraic recognition are not implemented.
- The polynomial
Deltadetour does not extrapolate ani0limit. - The scalar grouped-series report uses an analytic tail majorant evaluated in MPFR midpoint arithmetic. The Pfaffian boundary-shell error and the epsilon-reconstruction error are empirical estimates.
- Epsilon reconstruction requires a user-supplied Laurent range, radius, and sample count. The pole order is not inferred, and the samples run serially.
- Singular parameter specializations can change the holonomic rank.
- Complex ball certified mode is not implemented.
This repository is distributed under GNU GPL version 3 only
(GPL-3.0-only). See LICENSE, NOTICE, and
THIRD_PARTY_NOTICES.md.
This repository is an independent Risa/Asir port and reimplementation. It does not include the reference Mathematica source. The algorithms and formulas are based on the paper by Banik--Bera and its GPL-3.0 reference implementation. Risa/Asir, OpenXM, and the Docker image are separate distributions.
- S. Banik and S. Bera, “HyperPrecision: A Mathematica package for High-Precision Numerical Evaluation of Multivariate Hypergeometric Functions,” Computer Physics Communications 328 (2026), 110328, https://doi.org/10.1016/j.cpc.2026.110328.
- H. Kimura, “On the Lie Algebra of Contiguity for the Hypergeometric Functions
$F_A$ ,$F_B$ and$F_D$ ,” Kyushu Journal of Mathematics 78 (2024), 129–152, https://doi.org/10.2206/kyushujm.78.129. - F. Johansson, “Computing Hypergeometric Functions Rigorously,” https://arxiv.org/abs/1606.06977.
- Reference implementation: https://github.com/HyperPrecision/HyperPrecision.
- Risa/Asir container: https://github.com/NAKANORyunosuke/Risa-Asir-container.
- OpenXM/Risa/Asir: https://www.openxm.org/.
OpenAI Codex contributed to the initial Risa/Asir implementation, tests, and documentation. NAKANO Ryuosuke specified the mathematical scope, the Risa/Asir container, the independent arithmetic-geometric mean boundary test, the license, and the release requirements.