Repository navigation
Conversation
…e-double and arbitrary precision
Full-colour (and NLC) pure-gluon processes always use the contracted-color
topology replay, and `run_double`/`run_float` rejected it ("compiled/eager
contracted-color topology replay currently exposes f64"), so
`evaluate_with_precision` failed for them.
`run_generic_with_color_topology_replay` evaluates the materialized sectors at
every replay relabelling in the generic precision, routes their summed groups
to the physical groups (`gather_color_topology_replay_generic`, the
counterpart of `gather_color_topology_replay_samples`) and contracts them
(`reduce_color_topology_replay_generic`). The group contraction of
`evaluate_raw_sums_generic` moves into `contract_groups_generic`, shared by
both; `run_generic_materialized` and the replay share the extracted stage
evaluation `evaluate_generic_stages`.
`tests/compiled_color_topology_replay_precision.rs` (artifact from
`RUSTICOL_COMPILED_COLOR_REPLAY_ARTIFACT`) compares ratios of g g > g g totals
between exact massless integer points with the exact tree-level ratios at 32
digits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Arbitrary-precision evaluation (`evaluate_with_precision` above 32 digits) returned binary64 accuracy padded with digits. The generic path converts the artifact's binary64 constants (normalization, colour weights, model parameters, masses, source-state factors, replay weights, process-group factor) with `T::from(f64)`, which gives a 53-bit numerica `Float`; a `Float` product is rounded to the smaller precision of its factors, so every result was rounded to binary64. `RusticolHighPrecisionNumber::from_f64_constant` converts such a constant at the working precision (`Float::with_val(binary_precision, value)`; unchanged for `DoubleFloat`), and the generic source fill uses masses converted the same way (`CarrierMasses`). Unit crossing signs and phases are left as they are: numerica multiplies by +-1 without rounding. The replay test now also checks 64 digits against the exact tree-level ratios. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion of the contracted-color topology replay `evaluate_resolved_with_precision` on a full-colour (or NLC) pure-gluon artifact, which always uses the contracted-color topology replay, fell through `run_resolved_generic` to the paths without the replay relabellings and returned wrong components without an error: for g g > g g at one point the 32-digit resolved total was 6.36 against 915.33 in binary64. `run_resolved_generic_with_color_topology_replay` is the generic-precision counterpart of `run_resolved_f64_with_color_topology_replay_unprofiled`: it gathers the physical groups of every replay relabelling (the loop of `run_generic_with_color_topology_replay`, now shared as `gather_generic_color_topology_replay`) and contracts them per physical helicity in T (`reduce_color_topology_replay_generic_resolved`). The helicity bookkeeping of the binary64 reduction (members of each physical group with their weights, selected positions, contraction entries) moves into `ColorReplayResolvedLayout`, shared by both precisions. The replay test now also checks, at 32 and 64 digits, that the components sum to the unresolved total, agree with binary64, are parity symmetric, and that a helicity selector returns its component alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added 15a52ee: resolved (per-helicity) double-double and arbitrary-precision evaluation of the contracted-color topology replay.
|
…y-precision contractions The artifact stores every colour-contraction weight both in binary64 and as an exact rational (`exact_weight`, e.g. 64/3 for u u~ > g g at full colour), but the native generic-precision contractions used the binary64 value, so every double-double or arbitrary-precision |M|^2 with a non-dyadic weight carried a constant relative error of order 1e-16 (g g > g g at full colour: 4.9e-17; u u~ > g g: 2^-54). Ratios between points cancel it, which is why the replay test did not see it. `ColorContractionEntry` now carries the exact weight (`ExactColorWeight`, numerators and denominators below 2^85), parsed from the manifest and checked against the binary64 weight; the four generic contractions convert it at the working precision (`color_weight_generic`). Binary64 paths and synthesized entries (Walsh blocks, eager lowering) are unchanged. The replay test now checks absolute values: the 32- and 64-digit totals, divided by the runtime's binary64 normalization factor, equal the exact colour sum 16 N^2 (N^2 - 1)(3 - tu/s^2 - su/t^2 - st/u^2) (observed 1e-31 and 6.6e-58). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added 01ce7a6: exact colour weights in the double-double and arbitrary-precision contractions. The artifact stores each colour-contraction weight both in binary64 and as an exact rational ( |
Summary
Two fixes to
NativeRuntime::evaluate_with_precision(featuresymbolica-runtime) for compiled artifacts.Contracted-color topology replay in double-double and arbitrary precision. Full-colour (and NLC) pure-gluon
processes always use the contracted-color topology replay, and
run_double/run_floatrejected it ("compiled/eagercontracted-color topology replay currently exposes f64").
run_generic_with_color_topology_replaynow evaluates thematerialized sectors at every replay relabelling in the generic precision, routes their summed groups to the physical
groups (
gather_color_topology_replay_generic, mirroringgather_color_topology_replay_samples) and contracts them(
reduce_color_topology_replay_generic). The group contraction ofevaluate_raw_sums_genericis factored intocontract_groups_genericand shared;run_generic_materializedand the replay share the extracted stage evaluationevaluate_generic_stages.Artifact constants at the working precision. Above 32 digits the results had binary64 accuracy, padded with
digits, for every compiled artifact (with or without replay). The generic path converted binary64 constants
(normalization, colour weights, model parameters, masses, source-state factors, replay weights, process-group
factor) with
T::from(f64), i.e. a 53-bit numericaFloat, and aFloatproduct is rounded to the smallerprecision of its factors.
RusticolHighPrecisionNumber::from_f64_constantnow converts them at the workingprecision (
Float::with_val(binary_precision, value); unchanged forDoubleFloat); the generic source fill usesmasses converted the same way via
CarrierMasses. Unit crossing signs and phases are unchanged (numericamultiplies by ±1 without rounding).
The constants themselves remain the artifact's binary64 values (as before); this change only stops them from capping
the precision of everything they multiply.
Tests
rust/crates/rusticol-core/tests/compiled_color_topology_replay_precision.rs(runs whenRUSTICOL_COMPILED_COLOR_REPLAY_ARTIFACTpoints topyamplicol generate 'g g > g g' DIR --color-accuracy full --execution-mode compiled): exact massless integer points;ratios of totals between points cancel the couplings and must equal the exact tree-level ratios of
9/2 (3 − tu/s² − su/t² − st/u²) to ≤ 1e-27 at 32 digits and ≤ 1e-58 at 64 digits; totals agree with binary64 to
≤ 1e-12.
Ratios to the exact analytic values:
Run on
loopat bae3b9e plus these two commits (candidate build, artifact from that generator): the new testpasses at 32 and 64 digits;
compiled_binary64_with_symbolicapasses; the 152rusticol-coreunit tests matchinggeneric/precision/double/float/exact/replay pass (with
PYAMPLICOL_TEST_PYTHONset for the Python-producerround trip). The ratio values in the table were measured with the same two commits on 79df367 and the
u d > u d/u u~ > g gartifacts of that generator.cargo check -p rusticol-corewith default features,symbolica-runtimeandloop-v2: no new warnings.🤖 Generated with Claude Code