Build Status

This is a fork from https://github.com/marcusps/ExpmV.jl, implementing the evaluation for multiple values of the parameter t.

This is a Julia translation of the MATLAB implementation of Al-Mohy and Higham's function for computing expm(t*A)*v when A is sparse, without explicitly computing expm(A).

If t is a StepRangeLen object (i. e. a linspace), use an optimized algorithm to output the result for all t.

The original code can be found at (https://github.com/higham/expmv), and the theory is explained in the following article:

Computing the Action of the Matrix Exponential, with an Application to Exponential Integrators, Awad H. Al-Mohy and Nicholas J. Higham, SIAM Journal on Scientific Computing 2011 33:2, 488-511. (preprint)

The fast 1-norm estimation that is crucial for the speed of this algorithm is adapted from code available in Julia's Base module. This function (norm1est) is licensed under the MIT license.


Install into Julia using the package manager:



expmv(t, A, v)

Eg. t = 1., or t = linspace(0, 1, 100).


This benchmark shows the performance of ExpmV compared to Expokit.jl and the builtin dense expm of Julia, for complex, non-Hermitian matrices. The benchmark is done using BenchmarkTools.jl on a Macbook Pro 2016 with 2,9 GHz Intel Core i5 and 16 GB RAM. The script is in benchmark/compare.jl.

Matrix density 0.01

Matrix rowsExpmExpokitExpmv
32158.495 μs30.100 μs53.609 μs
64856.923 μs52.036 μs58.536 μs
1287.805 ms537.083 μs80.650 μs
25640.027 ms2.993 ms112.047 μs
512277.680 ms3.195 ms218.490 μs
10241.902 s4.267 ms571.590 μs

Matrix density 0.001

Matrix rowsExpmExpokitExpmv
3231.147 μs12.144 μs55.103 μs
64471.424 μs15.816 μs53.599 μs
1287.368 ms34.339 μs60.320 μs
25627.817 ms61.137 μs76.773 μs
512325.282 ms182.016 μs142.402 μs
10241.568 s2.137 ms306.293 μs


Released under the BSD 2-clause license used in Al-Mohy and Higham's original code.