Exact versus approximate evaluation of 6๐น5 conservative-matrix-field chains on the Apple M5 Max: A reproducible latency-and-throughput study

Experimental-mathematics engines in the Ramanujan Machine / conservative-matrix-field (CMF) family reduce the discovery of closed forms for mathematical constants to one hot loop: multiplying a long chain of small integer matrices and inspecting the projective limit. For a rank-6 (6F5) field the accumulated 6ร—6 product reaches ~9,500 bits after only 1,000 steps, so the choice of arithmetic โ€” exact big-integer, residue-number-system (RNS), or fast-but-lossy floating point โ€” determines both throughput and scientific validity. We present a fully reproducible benchmark, pinned by SHA-256 across three workloads (17- to 62-bit operators), that times exact and approximate back-ends against an exact reference on an Apple M5 Max laptop: Python int, SymPy, FLINT, GMP, Boost.Multiprecision, a threaded Montgomery-RNS CPU engine, a Metal RNS GPU kernel, Apple Accelerate BLAS, and a Metal double-float (df64) GPU kernel. Every exact back-end reproduces the reference digest; every floating-point back-end is scored by projective error. Crucially, we compare like with like โ€” GPU batch throughput against CPU trajectory-parallel throughput across all 18 cores, and RNS modular-kernel throughput separately from end-to-end exact throughput including Chinese-Remainder reconstruction. Three regimes emerge: (i) for a single exact chain, big-integer GMP is fastest (~8.5 ms); (ii) for exact throughput, the RNS-GPU modular kernel peaks near 3k trajectories/GPU-s, but once per-trajectory CRT is required the exact RNS path (~0.5k/s) falls below trajectory-parallel GMP (~1.5k/s), so the GPU wins on exact arithmetic only when reconstruction is amortised; (iii) for approximate screening, the df64 GPU only matches the 18-core Accelerate CPU (~17k/s) at large batch, because a 6ร—6 multiply is too small to amortise GPU launch. A bit-growth study (N โ‰ค 2000) locates the exact-arithmetic crossover as a function of integer size. All code, data, dumps, figures, and provenance are released for independent re-verification

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-08-21
DOI
https://doi.org/10.5281/zenodo.22046802
Primary Topic
Tensor decomposition and applications
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Exact versus approximate evaluation of 6๐น5 conservative-matrix-field chains on the Apple M5 Max: A reproducible latency-and-throughput study

David Vesterlund
Zenodo (CERN European Organization for Nuclear Research)
Tensor decomposition and applications
preprint

Exact versus approximate evaluation of 6๐น5 conservative-matrix-field chains on the Apple M5 Max: A reproducible latency-and-throughput study

David Vesterlund
preprint en

Abstract

Experimental-mathematics engines in the Ramanujan Machine / conservative-matrix-field (CMF) family reduce the discovery of closed forms for mathematical constants to one hot loop: multiplying a long chain of small integer matrices and inspecting the projective limit. For a rank-6 (6F5) field the accumulated 6ร—6 product reaches ~9,500 bits after only 1,000 steps, so the choice of arithmetic โ€” exact big-integer, residue-number-system (RNS), or fast-but-lossy floating point โ€” determines both throughput and scientific validity. We present a fully reproducible benchmark, pinned by SHA-256 across three workloads (17- to 62-bit operators), that times exact and approximate back-ends against an exact reference on an Apple M5 Max laptop: Python int, SymPy, FLINT, GMP, Boost.Multiprecision, a threaded Montgomery-RNS CPU engine, a Metal RNS GPU kernel, Apple Accelerate BLAS, and a Metal double-float (df64) GPU kernel. Every exact back-end reproduces the reference digest; every floating-point back-end is scored by projective error. Crucially, we compare like with like โ€” GPU batch throughput against CPU trajectory-parallel throughput across all 18 cores, and RNS modular-kernel throughput separately from end-to-end exact throughput including Chinese-Remainder reconstruction. Three regimes emerge: (i) for a single exact chain, big-integer GMP is fastest (~8.5 ms); (ii) for exact throughput, the RNS-GPU modular kernel peaks near 3k trajectories/GPU-s, but once per-trajectory CRT is required the exact RNS path (~0.5k/s) falls below trajectory-parallel GMP (~1.5k/s), so the GPU wins on exact arithmetic only when reconstruction is amortised; (iii) for approximate screening, the df64 GPU only matches the 18-core Accelerate CPU (~17k/s) at large batch, because a 6ร—6 multiply is too small to amortise GPU launch. A bit-growth study (N โ‰ค 2000) locates the exact-arithmetic crossover as a function of integer size. All code, data, dumps, figures, and provenance are released for independent re-verification

Zenodo (CERN European Organization for Nuclear Research)
Tensor decomposition and applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.