SuperLU 6.0.1
Functions
sgst07.c File Reference
#include <math.h>
#include "slu_sdefs.h"
Include dependency graph for sgst07.c:

Functions

int sgst07 (trans_t trans, int n, int nrhs, SuperMatrix *A, float *b, int ldb, float *x, int ldx, float *xact, int ldxact, float *ferr, float *berr, float *reslts)
 

Detailed Description

SGST07 tests the error bounds from iterative refinement for the computed solution to a system of equations op(A)*X = B, where A is a general n by n matrix and op(A) = A or A**T, depending on TRANS.

Function Documentation

◆ sgst07()

int sgst07 ( trans_t  trans,
int  n,
int  nrhs,
SuperMatrix A,
float *  b,
int  ldb,
float *  x,
int  ldx,
float *  xact,
int  ldxact,
float *  ferr,
float *  berr,
float *  reslts 
)

SGST07 tests the error bounds from iterative refinement for the computed solution to a system of equations op(A)*X = B, where A is a general n by n matrix and op(A) = A or A**T, depending on TRANS.

RESLTS(1) = test of the error bound = norm(X - XACT) / ( norm(X) * FERR ) A large value is returned if this ratio is not less than one.

RESLTS(2) = residual from the iterative refinement routine = the maximum of BERR / ( (n+1)*EPS + (*) ), where (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )

Parameters
[in]transSpecifies the form of the system of equations. = NOTRANS: A *x = b = TRANS : A'*x = b, where A' is the transpose of A = CONJ : A'*x = b, where A' is the transpose of A
[in]nThe number of rows of the matrices X and XACT. N >= 0.
[in]nrhsThe number of columns of the matrices X and XACT. NRHS >= 0.
[in]AThe original n by n matrix A, dimension(A->nrow, A->ncol).
[in]bThe right hand side vectors for the system of linear equations, dimension (LDB,NRHS).
[in]ldbThe leading dimension of the array B. LDB >= max(1,N).
[in]xThe computed solution vectors, dimension(LDX,NRHS). Each vector is stored as a column of the matrix X.
[in]ldxThe leading dimension of the array X. LDX >= max(1,N).
[in]xactThe exact solution vectors, dimension(LDX,NRHS). Each vector is stored as a column of the matrix XACT.
[in]ldxactThe leading dimension of the array XACT. LDXACT >= max(1,N).
[in]ferrThe estimated forward error bounds for each solution vector X, dimension(NRHS). If XTRUE is the true solution, FERR bounds the magnitude of the largest entry in (X - XTRUE) divided by the magnitude of the largest entry in X.
[in]berrThe componentwise relative backward error of each solution vector (i.e., the smallest relative change in any entry of A or B that makes X an exact solution), dimension(NRHS).
[out]resltsThe maximum over the NRHS solution vectors of the ratios, dimension (2): RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR ) RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
Here is the call graph for this function: