|
NAG[f07avc] NAG[nag_zgerfs] - Refined solution with error bounds of complex system of linear equations, multiple right-hand sides
|
|
Calling Sequence
f07avc(trans, a, af, ipiv, b, x, ferr, berr, 'n'=n, 'nrhs'=nrhs, 'fail'=fail)
nag_zgerfs(. . .)
Parameters
|
a - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
af - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
ipiv - Vector(1..dim, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
Note: the dimension, dim, of the array ipiv must be at least .
|
|
|
b - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
x - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On exit: the improved solution matrix .
|
|
|
ferr - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array ferr must be at least .
|
|
|
berr - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array berr must be at least .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array a.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'nrhs'=nrhs - integer; (optional)
|
|
|
Default value: the second dimension of the array x.
|
|
On entry: , the number of right-hand sides.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_zgerfs (f07avc) returns error bounds for the solution of a complex system of linear equations with multiple right-hand sides, , or . It improves the solution by iterative refinement, in order to reduce the backward error as much as possible.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
|
|
Accuracy
|
|
The bounds returned in ferr are not rigorous, because they are estimated, not computed exactly; but in practice they almost always overestimate the actual error.
|
|
Further Comments
|
|
For each right-hand side, computation of the backward error involves a minimum of real floating-point operations. Each step of iterative refinement involves an additional real operations. At most five steps of iterative refinement are performed, but usually only 1 or 2 steps are required.
Estimating the forward error involves solving a number of systems of linear equations of the form or ; the number is usually 5 and never more than 11. Each solution involves approximately real operations.
The real analogue of this function is f07ahc (nag_dgerfs).
|
|
|
Examples
|
|
>
|
trans := "Nag_NoTrans":
n := 4:
nrhs := 2:
a := Matrix([[-1.34 +2.55*I , 0.28 +3.17*I , -6.39 -2.2*I , 0.72 -0.92*I ], [-0.17 -1.41*I , 3.31 -0.15*I , -0.15 +1.34*I , 1.29 +1.38*I ], [-3.29 -2.39*I , -1.91 +4.42*I , -0.14 -1.35*I , 1.72 +1.35*I ], [2.41 +0.39*I , -0.5600000000000001 +1.47*I , -0.83 -0.6899999999999999*I , -1.96 +0.67*I ]], datatype=complex[8]):
af := Matrix([[-3.29 -2.39*I , -1.91 +4.42*I , -0.14 -1.35*I , 1.72 +1.35*I ], [0.2376120269469406 +0.2559596521570857*I , 4.895180634002975 -0.711362223485444*I , -0.462279846639494 +1.696610587680362*I , 1.226852844063328 +0.6189731619114427*I ], [-0.1019520808892006 -0.7010135339437114*I , -0.6691496431943212 +0.3688698547971655*I , -5.141410913810232 -1.129969734660953*I , 0.9982579915199449 +0.3850152275763778*I ], [-0.5358546703595748 +0.2707272529359829*I , -0.2040217794587079 +0.8601180679984047*I , 0.008233047063940029 +0.1210636819910635*I , 0.1482391810748419 -0.1252239986075848*I ]], datatype=complex[8]):
ipiv := Vector([3, 2, 3, 4], datatype=integer[kernelopts('wordsize')/8]):
b := Matrix([[26.26 +51.78*I , 31.32 -6.7*I ], [6.43 -8.68*I , 15.86 -1.42*I ], [-5.75 +25.31*I , -2.15 +30.19*I ], [1.16 +2.57*I , -2.56 +7.55*I ]], datatype=complex[8]):
x := Matrix([[0.9999999999999973 +0.9999999999999994*I , -0.999999999999994 -2.000000000000014*I ], [1.999999999999999 -2.999999999999999*I , 4.999999999999995 +0.9999999999999999*I ], [-4.000000000000002 -5.000000000000001*I , -2.999999999999997 +3.999999999999998*I ], [-2.155845151262139e-15 +5.999999999999998*I , 2.000000000000015 -3.000000000000013*I ]], datatype=complex[8]):
ferr := Vector(2, datatype=float[8]):
berr := Vector(2, datatype=float[8]):
NAG:-f07avc(trans, a, af, ipiv, b, x, ferr, berr, 'n' = n, 'nrhs' = nrhs):
|
|
|