On entry: the first dimension of the array B as declared in the (sub)program from which F01GAF is called.

Constraint:
LDB≥max1,N.

7: T – REAL (KIND=nag_wp)Input

On entry: the scalar t.

8: IFAIL – INTEGERInput/Output

On entry: IFAIL must be set to 0, -1​ or ​1. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.

For environments where it might be inappropriate to halt program execution when an error is detected, the value -1​ or ​1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is 0. When the value -1​ or ​1 is used it is essential to test the value of IFAIL on exit.

On exit: IFAIL=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry IFAIL=0 or -1, explanatory error messages are output on the current error message unit (as defined by X04AAF).

Errors or warnings detected by the routine:

IFAIL=1

Note: this failure should not occur, and suggests that the routine has been called incorrectly. An unexpected internal error occurred when trying to balance the matrix A.

7 Accuracy

For a symmetric matrix A (for which AT=A) the computed matrix etAB is guaranteed to be close to the exact matrix, that is, the method is forward stable. No such guarantee can be given for non-symmetric matrices. See Section 4 of Al–Mohy and Higham (2011) for details and further discussion.

8 Further Comments

The matrix etAB could be computed by explicitly forming etA using F01ECF and multiplying B by the result. However, experiments show that it is usually both more accurate and quicker to use F01GAF.

The cost of the algorithm is On2m. The precise cost depends on A since a combination of balancing, shifting and scaling is used prior to the Taylor series evaluation.

Approximately n2+2m+8n of real allocatable memory is required by F01GAF.

F01HAF can be used to compute etAB for complex A, B, and t. F01GBF provides an implementation of the algorithm with a reverse communication interface, which returns control to the user when matrix multiplications are required. This should be used if A is large and sparse.