


% -*- texinfo -*-
% @deftypefn {Function File} {} expm (@var{a})
% Return the exponential of a matrix, defined as the infinite Taylor
% series
% @tex
% $$
% \exp (A) = I + A + {A^2 \over 2~} + {A^3 \over 3~} + \cdots
% $$
% @end tex
% @ifnottex
%
% @example
% expm(a) = I + a + a^2/2~ + a^3/3~ + @dots{}
% @end example
%
% @end ifnottex
% The Taylor series is @emph{not} the way to compute the matrix
% exponential; see Moler and Van Loan, @cite{Nineteen Dubious Ways to
% Compute the Exponential of a Matrix}, SIAM Review, 1978. This routine
% uses Ward's diagonal
% @tex
% Pad\'e
% @end tex
% @ifnottex
% Pade'
% @end ifnottex
% approximation method with three step preconditioning (SIAM Journal on
% Numerical Analysis, 1977). Diagonal
% @tex
% Pad\'e
% @end tex
% @ifnottex
% Pade'
% @end ifnottex
% approximations are rational polynomials of matrices
% @tex
% $D_q(a)^{-1}N_q(a)$
% @end tex
% @ifnottex
%
% @example
% @group
% -1
% D (a) N (a)
% @end group
% @end example
%
% @end ifnottex
% whose Taylor series matches the first
% @tex
% $2 q + 1 $
% @end tex
% @ifnottex
% @code{2q+1}
% @end ifnottex
% terms of the Taylor series above; direct evaluation of the Taylor series
% (with the same preconditioning steps) may be desirable in lieu of the
% @tex
% Pad\'e
% @end tex
% @ifnottex
% Pade'
% @end ifnottex
% approximation when
% @tex
% $D_q(a)$
% @end tex
% @ifnottex
% @code{Dq(a)}
% @end ifnottex
% is ill-conditioned.
% @end deftypefn