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)=∑k≥0Ak/k!\exp(A) = \sum_{k \ge 0} A^k/k! of the square matrix AA.

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

∥∑k=N∞(2−rA)kk!∥∞≤∑k=N∞(2−r∥A∥∞)kk!,\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 AA 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∥∞>22w\|A\|_\infty > 2^{2w} for the working precision ww, 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-11-02).