arb_mat_mul_classical, arb_mat_mul_threaded, arb_mat_mul_block, arb_mat_mul
#include <flint/arb_mat.h>Set C (res) to the matrix product AB. The classical version computes each entry with arb_dot; the threaded version does the same with the rows of the output distributed over the threads of flint_get_num_threads(); the block version multiplies the midpoints exactly as integer matrices and bounds the radii separately. The default chooses automatically.
arb_mat_mul uses the block version if all three dimensions exceed a cutoff (60 for \mathit{prec} \le 128, 50 for \mathit{prec} \le 512, 40 otherwise), and the classical (or, with several threads and more than 10^5 bit operations per thread unit, the threaded) version otherwise.
The block version groups consecutive columns of A and rows of B into blocks in which the entries of each row of A (each column of B) have exponents within about 1.25 \min(\mathit{prec}, b) + 192 bits, where b is the largest midpoint size; converts each block to an integer matrix scaled per row (per column); multiplies the integer matrices with fmpz_mat_mul (multimodular or BLAS-like algorithms, see Multiplying matrices over the integers); and rounds and accumulates the results. Blocks with fewer than 30 columns are multiplied by dot products instead. The radii are bounded by |A_m| B_r + A_r(|B_m| + B_r), computed as products of nonnegative matrices with _arb_mat_addmul_rad_mag_fast. Matrices with entries whose exponents are not small, or whose midpoints have more than 8000 bits, or that are very sparse at high precision, are multiplied classically (Ball matrix multiplication).
Guides#
The FLINT team, “arb_mat_mul_classical, arb_mat_mul_threaded, arb_mat_mul_block, arb_mat_mul (arb_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arb_mat/arb_mat_mul_classical.html (generated 2026-10-20).
@misc{flint-doc-arb-mat-arb-mat-mul-classical,
author = {{The FLINT team}},
title = {{arb\_mat\_mul\_classical, arb\_mat\_mul\_threaded, arb\_mat\_mul\_block, arb\_mat\_mul (arb\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/arb_mat/arb_mat_mul_classical.html},
note = {Generated 2026-10-20}
}