CERN openlab · Project note
Explaining numerical precision in a lightning talk
On 18 August I took PEPPER to the CERN Council Chamber for the openlab lightning talks. I had about five minutes to explain where floating-point rounding matters in a simulated collision. The public agenda has my slides and recording.
How I’d test a faster calculation
The next question I’d ask is where a mixture of 32-bit and 64-bit arithmetic can work. I’d start by feeding the same event kinematics through both versions and comparing intermediate quantities as well as the final weight. Using the same inputs matters because two independent Monte Carlo runs will differ even when the arithmetic is identical.
I’d trace the largest discrepancies back to the first operation that accounts for them, then test that operation in FP64 or rewrite it in a more stable form. Next I’d compare cross sections and distributions across processes. I’d pay particular attention near cuts and in sparsely populated bins, where a shift in event weights can matter even if the overall rate barely moves.
The final check is a benchmark on the target hardware. Keeping sensitive operations in FP64 leaves a practical question: does the remaining FP32 work save time across the whole workflow?
Back to the notebook
This is what made the project interesting to me. A question that starts with a data type takes you all the way back to which events matter for a physics analysis. Thanks to Enrico Bothmann and František Stloukal for supervising the project.