# naginterfaces.library.matop.real_​gen_​matrix_​exp¶

naginterfaces.library.matop.real_gen_matrix_exp(a)[source]

real_gen_matrix_exp computes the matrix exponential, , of a real matrix .

For full information please refer to the NAG Library document for f01ec

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/f01/f01ecf.html

Parameters
afloat, array-like, shape

The matrix .

Returns
afloat, ndarray, shape

The matrix exponential .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

The linear equations to be solved for the Padé approximant are singular; it is likely that this function has been called incorrectly.

(errno )

The linear equations to be solved are nearly singular and the Padé approximant probably has no correct figures; it is likely that this function has been called incorrectly.

(errno )

Warns
NagAlgorithmicWarning
(errno )

The arithmetic precision is higher than that used for the Padé approximant computed matrix exponential.

Notes

is computed using a Padé approximant and the scaling and squaring method described in Al–Mohy and Higham (2009).

References

Al–Mohy, A H and Higham, N J, 2009, A new scaling and squaring algorithm for the matrix exponential, SIAM J. Matrix Anal. (31(3)), 970–989

Higham, N J, 2005, The scaling and squaring method for the matrix exponential revisited, SIAM J. Matrix Anal. Appl. (26(4)), 1179–1193

Higham, N J, 2008, Functions of Matrices: Theory and Computation, SIAM, Philadelphia, PA, USA

Moler, C B and Van Loan, C F, 2003, Nineteen dubious ways to compute the exponential of a matrix, twenty-five years later, SIAM Rev. (45), 3–49