Your free trial has ended.

Try the live demo or log in .

149ddffb

By: ValentinHirschi <valentin.hirschi@gmail.com>

Take the massless box's 1 - x and exact discriminants near collinear limits

The finite massless box (OneLOop's boxf0) lost precision in binary64 next
to a collinear limit, like the one- and two-adjacent-mass boxes before
3023fa6. Of 200 random massless boxes with one external invariant between
1e-14 and 1e-4 (the others up to 20), 34 were beyond 1e-12 against OneLOop's
quadruple precision on every route, up to 4e-3; OneLOop's double precision
loses the same. With a = r34 r24, b = r13 r24 + r12 r34 - r14 r23 and c =
r12 r13, the quadratic at u = r13/r34 and r12/r24 is r14 r23 u: when r14 or
r23 is small, one argument of each dilogarithm pair X r34/r13, X r24/r12 is
next to one. 1 - x now comes from the roots' offsets from u, the roots of
the shifted quadratic with OneLOop's labels (labelled_quadratic_roots), and
sheet_exact::complement_difference takes it as for the massive boxes.

Next to r13 r24 = r12 r34 as well, the discriminant is small and the
dilogarithm terms grow as its inverse and cancel each other, and b² - 4ac
cancelled by b²/d²: of 300 one- and two-adjacent-mass boxes with p1² from
1e-14 to 1e-4 and r13 r24/(r12 r34) - 1 from 1e-6 to 0.1, 16 lost 1e-10 to
3e-5 in binary64 after 3023fa6; a massless box at 2e-3 from it lost 2e-2.
The massless, one-mass and two-adjacent-mass boxes now take b² - 4ac in the
exact form (r13 r24 - r12 r34)² - T (2 (r13 r24 + r12 r34) - T) + rest
(collinear_square), with T = r14 r23 or k14 r23 and rest = 0,
4 r23 r24 r34 or 4 r23 (r24 r34 + r12 r13 - r23).

There the two dilogarithm terms (1.4e4 each, cancelling to 25, in the
two-mass box that 3023fa6 left at 5e-12 to 9e-12 with r12 r34/(r13 r24) - 1
= 2e-3; up to 1.8e-11 for p2² from 3.3 to 3.3e-14, where OneLOop's double
precision keeps 4e-13 at 3.3e-2 and loses 5e-3 at 3.3e-14), cancel only if
they see the same N = r13 r24 - r12 r34: their shifted coefficients b - 2au
are -N and N up to collinear terms, and summed in the evaluator's own order
each rounded N differently (the trace showed 1.5e-14 in one term's root
offsets, 2.6e-15 in the other's, against a well-conditioned box: one-ulp
input changes move it by 2e-16). N is now formed once (channel_gap) and
shared by both terms and the discriminant: the box keeps 9e-13 over the
whole scan on every route.

Two refinements of the complements, both for arguments far from one, where
a complement (about -x) carries no digits and, formed from other
expressions than the values, need not round as they do: the dilogarithm
takes it for log(1 - x) and Li2(1 - x) only above half (below half 1 - n
keeps its precision), and the divided difference takes the gap w2 - w1 only
when both arguments are within 1/2 of one. A massless box with a small p3²,
whose dilogarithm arguments reach 2e8, kept 1.5e-13 before and 2.5e-12 with
the complements everywhere.

On the random sets, against our 256 bits (which agree with OneLOop's
quadruple precision to 3e-30 wherever its double and quadruple precisions
agree to 1e-11): 200 massless boxes are within 2e-13 on every binary64
route (34 beyond 1e-12 before); of 1000 massless boxes with one or two small
invariants and scales from 1e-3 to 1e3, 2 are beyond 1e-12 (226 before, 219
in OneLOop's double precision), both next to r13 r24 = r12 r34 too: 1.2e-12,
and 4e-10 native, 5e-11 interpreted at 2e-3 from it (2e-2 before, OneLOop
1.3e-2). The 400 random one- and two-adjacent-mass collinear boxes of
3023fa6 are now all within 2.2e-13, and of the 300 next to both limits 6 are
beyond 1e-12, up to 1.4e-8 (61 in OneLOop's double precision; 16 before,
up to 3e-5).

New tests in tests/d0_collinear_limits.rs: massless boxes with p2² and p4²
small in the binary64 scans (within 1e-12 on every route), and
next_to_a_vanishing_discriminant_in_binary64 (a one-mass box within 1e-7,
3.1e-5 before; the two-mass box over its p2² scan within 1e-12; the massless
box at 2e-3 from r13 r24 = r12 r34 within 1e-9; the massless box with
arguments far from one within 1e-12).

Tests: full suite with generated evaluators passes (230 passed, 7 ignored).
Native code regenerated, D0 SymJIT asset rebuilt. Oracle sweeps (D0, four
seeds, native, generated and expression routes, against 3023fa6): no row
fixed or regressed on any route. Retired instructions per D0 and C0 call on
the recorded NinjaRS streams are unchanged (they contain no massless, one-
or two-adjacent-mass finite box).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>