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>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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