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

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

afloat, array-like, shape

The matrix .

afloat, ndarray, shape

The matrix exponential .

(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 )

An unexpected internal error has occurred. Please contact NAG.

(errno )

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


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


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