FLINT3.7.0-dev

arb_mat_exp

Synopsis#include <flint/arb_mat.h>
void arb_mat_exp(arb_mat_t B, const arb_mat_t A, slong prec)source

Sets B to the exponential \exp(A) = \sum_{k \ge 0} A^k/k! of the square matrix A.

The function uses scaling and squaring: it evaluates \exp(2^{-r} A) by arb_mat_exp_taylor_sum with N terms and squares the result r times, at a working precision of \mathit{prec} + 3 \log_2 \mathit{prec} bits, with r chosen so that \|2^{-r} A\|_\infty \approx 2^{-\mathit{prec}^{1/4}}. The truncation error in each entry is bounded by

\left\|\sum_{k=N}^{\infty} \frac{(2^{-r} A)^k}{k!}\right\|_{\infty} \le \sum_{k=N}^{\infty} \frac{(2^{-r} \|A\|_{\infty})^k}{k!},

computed by mag_exp_tail. The sparsity structure of A is used: a diagonal matrix is exponentiated entrywise, a nilpotent structure limits the number of terms, and no truncation error is added to entries that are zero for structural reasons. The structure is found with the graph functions of Walks, cycles and components applied to the pattern of nonzero entries. If \|A\|_\infty > 2^{2w} for the working precision w, the result is indeterminate.

Guides#

Cite this page

The FLINT team, “arb_mat_exp (arb_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arb_mat/arb_mat_exp.html (generated 2026-10-20).