Search arXivSearch

arXiv · 2601.07508

Multiword matrix multiplication over large finite fields in floating-point arithmetic

Abstract

This article is concerned with the efficient computation of modular matrix multiplication C=AB mod p, a key kernel in computer algebra. We focus on floating-point arithmetic, which allows for using efficient matrix multiplication libraries. However, the existing approach is limited to primes p with bitsize at most half the mantissa size (e.g., 26 bits with double precision arithmetic), and becomes quite inefficient when p approaches this limit. We present a new approach that overcomes this limitation and can efficiently handle primes with larger bitsizes. The key idea is to use multiword decompositions, which represent A and B as scaled sums of u and v matrices (words) with smaller coefficients. We provide a rigorous analysis that proves the correctness of this approach for suitably chosen scaling parameters. Our analysis determines the maximum bitsize of p that can be handled for a given number of words; in particular, we show that decomposing in two words each input suffices to handle bitsizes almost equal to the full mantissa size (e.g., the 26 bits limit is raised to 52 bits in double precision arithmetic). Moreover, we show that (1,v) decompositions with v>1 are also of interest to handle intermediate bitsizes. We perform an extensive experimental analysis for various matrix shapes and prime bitsizes. Our performance benchmarks on both CPU and GPU architectures confirm the efficiency of the proposed approach, which can outperform the existing single word approach for bitsizes as low as 23, and can handle bitsizes as high as 52 while retaining high performance.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Jérémy Berthomieu, Stef Graillat, Dimitri Lesnoff, Theo Mary. 2026-02-04. Multiword matrix multiplication over large finite fields in floating-point arithmetic. https://arxiv.org/abs/2601.07508

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Fully spectral scheme for the linear BGK equation on the whole space

In this article, we design a fully spectral method in both space and velocity for a linear inhomogeneous kinetic equation with mass, momentum and energy conservation. We focus on the linear BGK equation with a confinement potential $Φ$, even if the method could be applied to different collision operators. It is based upon the projection on Hermite polynomials in velocity and orthonormal polynomials with respect to the weight $e^{-$Φ$}$ in space. The potential $Φ$ is assumed to be a polynomial. It is, to the author's knowledge, the first scheme which preserves hypocoercive behavior in addition to the conservation laws. These different properties are illustrated numerically on both quadratic and double well potential.

math.NA

Inverse inequalities for kernel-based approximation on bounded domains and Riemannian manifolds

This paper establishes inverse inequalities for kernel-based approximation spaces defined on bounded Lipschitz domains in $\mathbb{R}^d$ and compact Riemannian manifolds. While inverse inequalities are well-studied for polynomial spaces, their extension to kernel-based trial spaces poses significant challenges. For bounded Lipschitz domains, we extend prior Bernstein inequalities, which only apply to a limited range of Sobolev orders, to the full range of lower and upper orders, and derive Nikolskii inequalities that bound $L_\infty$ norms by $L_2$ norms. For compact Riemannian manifolds, we focus on restricted kernels, which are defined as the restriction of positive definite kernels from the ambient Euclidean space to the manifold, and prove their counterparts.

math.NA

Error Estimates for Hyperbolic Scaling Limits of Linear Kinetic Models on Networks

This paper studies linear discrete kinetic models on networks and their asymptotic behavior in the small Knudsen number limit. For coupling conditions at an n-edge junction under a symmetric formulation, we introduce a change of variables that reformulates the system into n independent initial-boundary value problems. The asymptotic expansions are then constructed and rigorously justified by deriving an error estimate based on the energy method.

math.NA