cresidual - Man Page

Name

cresidual — C-Interface

— C-Interface for the residual computations.  

Synopsis

Functions

double mepack_double_residual_csylv (const char *TRANSA, const char *TRANSB, double sgn1, double sgn2, int M, int N, double *A, int LDA, double *B, int LDB, double *C, int LDC, double *D, int LDD, double *R, int LDR, double *L, int LDL, double *E, int LDE, double *F, int LDF, double SCALE)
Compute the relative residual for the coupled Sylvester equation.
float mepack_single_residual_csylv (const char *TRANSA, const char *TRANSB, float sgn1, float sgn2, int M, int N, float *A, int LDA, float *B, int LDB, float *C, int LDC, float *D, int LDD, float *R, int LDR, float *L, int LDL, float *E, int LDE, float *F, int LDF, float SCALE)
Compute the relative residual for the coupled Sylvester equation.
double mepack_double_residual_csylv_dual (const char *TRANSA, const char *TRANSB, double sgn1, double sgn2, int M, int N, double *A, int LDA, double *B, int LDB, double *C, int LDC, double *D, int LDD, double *R, int LDR, double *L, int LDL, double *E, int LDE, double *F, int LDF, double SCALE)
Compute the relative residual for the coupled Sylvester equation.
float mepack_single_residual_csylv_dual (const char *TRANSA, const char *TRANSB, float sgn1, float sgn2, int M, int N, float *A, int LDA, float *B, int LDB, float *C, int LDC, float *D, int LDD, float *R, int LDR, float *L, int LDL, float *E, int LDE, float *F, int LDF, float SCALE)
Compute the relative residual for the coupled Sylvester equation.
double mepack_double_residual_glyap (const char *TRANS, int M, double *A, int LDA, double *B, int LDB, double *X, int LDX, double *Y, int LDY, double SCALE)
Compute the relative residual for the generalized Lyapunov equation.
float mepack_single_residual_glyap (const char *TRANS, int M, float *A, int LDA, float *B, int LDB, float *X, int LDX, float *Y, int LDY, float SCALE)
Compute the relative residual for the generalized Lyapunov equation.
double mepack_double_residual_gstein (const char *TRANS, int M, double *A, int LDA, double *B, int LDB, double *X, int LDX, double *Y, int LDY, double SCALE)
Compute the relative residual for the generalized Stein equation.
float mepack_single_residual_gstein (const char *TRANS, int M, float *A, int LDA, float *B, int LDB, float *X, int LDX, float *Y, int LDY, float SCALE)
Compute the relative residual for the generalized Stein equation.
double mepack_double_residual_gsylv (const char *TRANSA, const char *TRANSB, double sgn, int M, int N, double *A, int LDA, double *B, int LDB, double *C, int LDC, double *D, int LDD, double *X, int LDX, double *Y, int LDY, double SCALE)
Compute the relative residual for the generalized Sylvester equation.
float mepack_single_residual_gsylv (const char *TRANSA, const char *TRANSB, float sgn, int M, int N, float *A, int LDA, float *B, int LDB, float *C, int LDC, float *D, int LDD, float *X, int LDX, float *Y, int LDY, float SCALE)
Compute the relative residual for the generalized Sylvester equation.
double mepack_double_residual_lyap (const char *TRANS, int M, double *A, int LDA, double *X, int LDX, double *Y, int LDY, double SCALE)
Compute the relative residual for the Lyapunov equation.
float mepack_single_residual_lyap (const char *TRANS, int M, float *A, int LDA, float *X, int LDX, float *Y, int LDY, float SCALE)
Compute the relative residual for the Lyapunov equation.
double mepack_double_residual_stein (const char *TRANS, int M, double *A, int LDA, double *X, int LDX, double *Y, int LDY, double SCALE)
Compute the relative residual for the Stein equation.
float mepack_single_residual_stein (const char *TRANS, int M, float *A, int LDA, float *X, int LDX, float *Y, int LDY, float SCALE)
Compute the relative residual for the Stein equation.
double mepack_double_residual_sylv (const char *TRANSA, const char *TRANSB, double sgn, int M, int N, double *A, int LDA, double *B, int LDB, double *X, int LDX, double *Y, int LDY, double SCALE)
Compute the relative residual for the Sylvester equation.
float mepack_single_residual_sylv (const char *TRANSA, const char *TRANSB, float sgn, int M, int N, float *A, int LDA, float *B, int LDB, float *X, int LDX, float *Y, int LDY, float SCALE)
Compute the relative residual for the Sylvester equation.
double mepack_double_residual_sylv2 (const char *TRANSA, const char *TRANSB, double sgn, int M, int N, double *A, int LDA, double *B, int LDB, double *X, int LDX, double *Y, int LDY, double SCALE)
Compute the relative residual for the discrete-time Sylvester equation.
float mepack_single_residual_sylv2 (const char *TRANSA, const char *TRANSB, float sgn, int M, int N, float *A, int LDA, float *B, int LDB, float *X, int LDX, float *Y, int LDY, float SCALE)
Compute the relative residual for the discrete-time Sylvester equation.

Detailed Description

C-Interface for the residual computations.

The routines in this group are wrappers around the Fortran routines from Residual Computations.

Function Documentation

double mepack_double_residual_csylv (const char * TRANSA, const char * TRANSB, double sgn1, double sgn2, int M, int N, double * A, int LDA, double * B, int LDB, double * C, int LDC, double * D, int LDD, double * R, int LDR, double * L, int LDL, double * E, int LDE, double * F, int LDF, double SCALE)

Compute the relative residual for the coupled Sylvester equation.

Purpose:

Compute the relative residual of the coupled Sylvester equation

RelRes = max( || SCALE*E - opA(A)*R - SGN1 * L *opB(B) || / ( (||A||*||R||+||B||*||L||) + SCALE * ||E|| ),
              || SCALE*F - opA(C)*R - SGN2 * L *opB(D) || / ( (||C||*||R||+||D||*||L||) + SCALE * ||F|| ))    (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN1

         SGN1 is DOUBLE PRECISION, allowed values: +/-1
         Specifies the sign in the first equation.

SGN2

         SGN2 is DOUBLE PRECISION, allowed values: +/-1
         Specifies the sign in the second equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is DOUBLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

C

         C is DOUBLE PRECISION array, dimension (LDC,M)
         The coefficient matrix C.

LDC

         LDC is INTEGER
         The leading dimension of the array C.  LDC >= max(1,M).

D

         D is DOUBLE PRECISION array, dimension (LDD,N)
         The coefficient matrix D.

LDD

         LDD is INTEGER
         The leading dimension of the array D.  LDD >= max(1,N).

R

         R is DOUBLE PRECISION array, dimension (LDR,N)
         The first of the Sylvester Equation.

LDR

         LDR is INTEGER
         The leading dimension of the array R.  LDX >= max(1,M).

L

         L is DOUBLE PRECISION array, dimension (LDL,N)
         The second solution the Sylvester Equation.

LDL

         LDL is INTEGER
         The leading dimension of the array L.  LDL >= max(1,M).

E

         E is DOUBLE PRECISION array, dimension (LDE,N)
         The first right hand side of the Sylvester Equation.

LDE

         LDE is INTEGER
         The leading dimension of the array E.  LDE >= max(1,M).

F

         F is DOUBLE PRECISION array, dimension (LDF,N)
         The second right hand side of the Sylvester Equation.

LDF

         LDF is INTEGER
         The leading dimension of the array F.  LDF >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_csylv

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 201 of file csylv.c.

double mepack_double_residual_csylv_dual (const char * TRANSA, const char * TRANSB, double sgn1, double sgn2, int M, int N, double * A, int LDA, double * B, int LDB, double * C, int LDC, double * D, int LDD, double * R, int LDR, double * L, int LDL, double * E, int LDE, double * F, int LDF, double SCALE)

Compute the relative residual for the coupled Sylvester equation.

Purpose:

Compute the relative residual of the coupled Sylvester equation

RelRes = max( || SCALE*E - opA(A)**T *R - opA(C) ** T *L || / ( (||A||*||R||+||C||*||L||) + SCALE * ||E|| ),
              || SCALE*F - SGN1 * R  * opB(B)**T - SGN2 * L * opB(D) **T || / ( (||B||*||R||+||D||*||L||) + SCALE * ||F||)) (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN1

         SGN1 is DOUBLE PRECISION, allowed values: +/-1
         Specifies the sign in the first equation.

SGN2

         SGN2 is DOUBLE PRECISION, allowed values: +/-1
         Specifies the sign in the second equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is DOUBLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

C

         C is DOUBLE PRECISION array, dimension (LDC,M)
         The coefficient matrix C.

LDC

         LDC is INTEGER
         The leading dimension of the array C.  LDC >= max(1,M).

D

         D is DOUBLE PRECISION array, dimension (LDD,N)
         The coefficient matrix D.

LDD

         LDD is INTEGER
         The leading dimension of the array D.  LDD >= max(1,N).

R

         R is DOUBLE PRECISION array, dimension (LDR,N)
         The first of the Sylvester Equation.

LDR

         LDR is INTEGER
         The leading dimension of the array R.  LDX >= max(1,M).

L

         L is DOUBLE PRECISION array, dimension (LDL,N)
         The second solution the Sylvester Equation.

LDL

         LDL is INTEGER
         The leading dimension of the array L.  LDL >= max(1,M).

E

         E is DOUBLE PRECISION array, dimension (LDE,N)
         The first right hand side of the Sylvester Equation.

LDE

         LDE is INTEGER
         The leading dimension of the array E.  LDE >= max(1,M).

F

         F is DOUBLE PRECISION array, dimension (LDF,N)
         The second right hand side of the Sylvester Equation.

LDF

         LDF is INTEGER
         The leading dimension of the array F.  LDF >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_csylv_dual

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 201 of file csylv_dual.c.

double mepack_double_residual_glyap (const char * TRANS, int M, double * A, int LDA, double * B, int LDB, double * X, int LDX, double * Y, int LDY, double SCALE)

Compute the relative residual for the generalized Lyapunov equation.

Purpose:

Compute the relative residual of the generalized Lyapunov equation

    RelRes = || SCALE*Y - op(A)*X*op(B)**T - op(B) * X * op(A)**T || / ( 2*||A||*||B||*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

         TRANS is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  op(A) = A (No transpose for A)
         == 'T':  op(A) = A**T (Transpose A)

M

         M is INTEGER
         The order of the matrices A.  M >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is DOUBLE PRECISION array, dimension (LDB,M)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,M).

X

         X is DOUBLE PRECISION array, dimension (LDX,M)
         Solution of the Lyapunov Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is DOUBLE PRECISION array, dimension (LDX,M)
         The right hand side of the Lyapunov Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_glyap

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 126 of file glyap.c.

double mepack_double_residual_gstein (const char * TRANS, int M, double * A, int LDA, double * B, int LDB, double * X, int LDX, double * Y, int LDY, double SCALE)

Compute the relative residual for the generalized Stein equation.

Purpose:

Compute the relative residual of the generalized Stein equation

    RelRes = || SCALE*Y - op(A)*X*op(A)**T + op(B) * X * op(B)**T || / ( (||A||**2+||B||**2)*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

         TRANS is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  op(A) = A (No transpose for A)
         == 'T':  op(A) = A**T (Transpose A)

M

         M is INTEGER
         The order of the matrices A.  M >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is DOUBLE PRECISION array, dimension (LDB,M)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,M).

X

         X is DOUBLE PRECISION array, dimension (LDX,M)
         Solution of the Stein Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is DOUBLE PRECISION array, dimension (LDX,M)
         The right hand side of the Stein Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_gstein

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 126 of file gstein.c.

double mepack_double_residual_gsylv (const char * TRANSA, const char * TRANSB, double sgn, int M, int N, double * A, int LDA, double * B, int LDB, double * C, int LDC, double * D, int LDD, double * X, int LDX, double * Y, int LDY, double SCALE)

Compute the relative residual for the generalized Sylvester equation.

Purpose:

Compute the relative residual of the generalized Sylvester equation

    RelRes = || SCALE*Y - opA(A)*X *opB(B) - SGN * opA(C) * X * opB(D) || / ( (||A||*||B||+||C||*||D||)*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN

         SGN is DOUBLE PRECISION, allowed values: +/-1
         Specifies the sign between the two parts of the Sylvester equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is DOUBLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

C

         C is DOUBLE PRECISION array, dimension (LDC,M)
         The coefficient matrix C.

LDC

         LDC is INTEGER
         The leading dimension of the array C.  LDC >= max(1,M).

D

         D is DOUBLE PRECISION array, dimension (LDD,N)
         The coefficient matrix D.

LDD

         LDD is INTEGER
         The leading dimension of the array D.  LDD >= max(1,N).

X

         X is DOUBLE PRECISION array, dimension (LDX,N)
         Solution of the Sylvester Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is DOUBLE PRECISION array, dimension (LDY,N)
         The right hand side of the Sylvester Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_gsylv

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 170 of file gsylv.c.

double mepack_double_residual_lyap (const char * TRANS, int M, double * A, int LDA, double * X, int LDX, double * Y, int LDY, double SCALE)

Compute the relative residual for the Lyapunov equation.

Purpose:

Compute the relative residual of the Lyapunov equation

    RelRes = || SCALE*Y - op(A)*X - X * op(A)**T || / ( 2*||A||*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

         TRANS is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  op(A) = A (No transpose for A)
         == 'T':  op(A) = A**T (Transpose A)

M

         M is INTEGER
         The order of the matrices A.  M >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

X

         X is DOUBLE PRECISION array, dimension (LDX,M)
         Solution of the Lyapunov Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is DOUBLE PRECISION array, dimension (LDX,M)
         The right hand side of the Lyapunov Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_lyap

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 114 of file lyap.c.

double mepack_double_residual_stein (const char * TRANS, int M, double * A, int LDA, double * X, int LDX, double * Y, int LDY, double SCALE)

Compute the relative residual for the Stein equation.

Purpose:

Compute the relative residual of the Stein equation

    RelRes = || SCALE*Y - op(A)*X*op(A)**T + X || / ( (||A||**2+1) * ||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

         TRANS is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  op(A) = A (No transpose for A)
         == 'T':  op(A) = A**T (Transpose A)

M

         M is INTEGER
         The order of the matrices A.  M >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

X

         X is DOUBLE PRECISION array, dimension (LDX,M)
         Solution of the Stein Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is DOUBLE PRECISION array, dimension (LDX,M)
         The right hand side of the Stein Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_stein

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 114 of file stein.c.

double mepack_double_residual_sylv (const char * TRANSA, const char * TRANSB, double sgn, int M, int N, double * A, int LDA, double * B, int LDB, double * X, int LDX, double * Y, int LDY, double SCALE)

Compute the relative residual for the Sylvester equation.

Purpose:

Compute the relative residual of the Sylvester equation

    RelRes = || SCALE*Y - opA(A)*X - SGN * X * opB(B) || / ( (||A||+||B||)*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN

         SGN is DOUBLE PRECISION, allowed values: +/-1
         Specifies the sign between the two parts of the Sylvester equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is DOUBLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

X

         X is DOUBLE PRECISION array, dimension (LDX,M)
         Solution of the Sylvester Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is DOUBLE PRECISION array, dimension (LDX,M)
         The right hand side of the Sylvester Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_sylv

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 147 of file sylv.c.

double mepack_double_residual_sylv2 (const char * TRANSA, const char * TRANSB, double sgn, int M, int N, double * A, int LDA, double * B, int LDB, double * X, int LDX, double * Y, int LDY, double SCALE)

Compute the relative residual for the discrete-time Sylvester equation.

Purpose:

Compute the relative residual of the discrete-time Sylvester equation

    RelRes = || SCALE*Y - opA(A)*X*op(B) - SGN*X || / ( (||A||*||B||+1)*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN

         SGN is DOUBLE PRECISION, allowed values: +/-1
         Specifies the sign between the two parts of the Sylvester equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is DOUBLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

X

         X is DOUBLE PRECISION array, dimension (LDX,M)
         Solution of the Sylvester Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is DOUBLE PRECISION array, dimension (LDX,M)
         The right hand side of the Sylvester Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

dla_residual_sylv2

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 147 of file sylv2.c.

float mepack_single_residual_csylv (const char * TRANSA, const char * TRANSB, float sgn1, float sgn2, int M, int N, float * A, int LDA, float * B, int LDB, float * C, int LDC, float * D, int LDD, float * R, int LDR, float * L, int LDL, float * E, int LDE, float * F, int LDF, float SCALE)

Compute the relative residual for the coupled Sylvester equation.

Purpose:

Compute the relative residual of the coupled Sylvester equation

RelRes = max( || SCALE*E - opA(A)*R - SGN1 * L *opB(B) || / ( (||A||*||R||+||B||*||L||) + SCALE * ||E|| ),
              || SCALE*F - opA(C)*R - SGN2 * L *opB(D) || / ( (||C||*||R||+||D||*||L||) + SCALE * ||F|| ))    (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN1

         SGN1 is SINGLE PRECISION, allowed values: +/-1
         Specifies the sign in the first equation.

SGN2

         SGN2 is SINGLE PRECISION, allowed values: +/-1
         Specifies the sign in the second equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is SINGLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is SINGLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

C

         C is SINGLE PRECISION array, dimension (LDC,M)
         The coefficient matrix C.

LDC

         LDC is INTEGER
         The leading dimension of the array C.  LDC >= max(1,M).

D

         D is SINGLE PRECISION array, dimension (LDD,N)
         The coefficient matrix D.

LDD

         LDD is INTEGER
         The leading dimension of the array D.  LDD >= max(1,N).

R

         R is SINGLE PRECISION array, dimension (LDR,N)
         The first of the Sylvester Equation.

LDR

         LDR is INTEGER
         The leading dimension of the array R.  LDX >= max(1,M).

L

         L is SINGLE PRECISION array, dimension (LDL,N)
         The second solution the Sylvester Equation.

LDL

         LDL is INTEGER
         The leading dimension of the array L.  LDL >= max(1,M).

E

         E is SINGLE PRECISION array, dimension (LDE,N)
         The first right hand side of the Sylvester Equation.

LDE

         LDE is INTEGER
         The leading dimension of the array E.  LDE >= max(1,M).

F

         F is SINGLE PRECISION array, dimension (LDF,N)
         The second right hand side of the Sylvester Equation.

LDF

         LDF is INTEGER
         The leading dimension of the array F.  LDF >= max(1,M).

SCALE

         SCALE is SINGLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_csylv

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 397 of file csylv.c.

float mepack_single_residual_csylv_dual (const char * TRANSA, const char * TRANSB, float sgn1, float sgn2, int M, int N, float * A, int LDA, float * B, int LDB, float * C, int LDC, float * D, int LDD, float * R, int LDR, float * L, int LDL, float * E, int LDE, float * F, int LDF, float SCALE)

Compute the relative residual for the coupled Sylvester equation.

Purpose:

Compute the relative residual of the coupled Sylvester equation

RelRes = max( || SCALE*E - opA(A)**T *R - opA(C) ** T *L || / ( (||A||*||R||+||C||*||L||) + SCALE * ||E|| ),
              || SCALE*F - SGN1 * R  * opB(B)**T - SGN2 * L * opB(D) **T || / ( (||B||*||R||+||D||*||L||) + SCALE * ||F||)) (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN1

         SGN1 is SINGLE PRECISION, allowed values: +/-1
         Specifies the sign in the first equation.

SGN2

         SGN2 is SINGLE PRECISION, allowed values: +/-1
         Specifies the sign in the second equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is SINGLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is SINGLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

C

         C is SINGLE PRECISION array, dimension (LDC,M)
         The coefficient matrix C.

LDC

         LDC is INTEGER
         The leading dimension of the array C.  LDC >= max(1,M).

D

         D is SINGLE PRECISION array, dimension (LDD,N)
         The coefficient matrix D.

LDD

         LDD is INTEGER
         The leading dimension of the array D.  LDD >= max(1,N).

R

         R is SINGLE PRECISION array, dimension (LDR,N)
         The first of the Sylvester Equation.

LDR

         LDR is INTEGER
         The leading dimension of the array R.  LDX >= max(1,M).

L

         L is SINGLE PRECISION array, dimension (LDL,N)
         The second solution the Sylvester Equation.

LDL

         LDL is INTEGER
         The leading dimension of the array L.  LDL >= max(1,M).

E

         E is SINGLE PRECISION array, dimension (LDE,N)
         The first right hand side of the Sylvester Equation.

LDE

         LDE is INTEGER
         The leading dimension of the array E.  LDE >= max(1,M).

F

         F is SINGLE PRECISION array, dimension (LDF,N)
         The second right hand side of the Sylvester Equation.

LDF

         LDF is INTEGER
         The leading dimension of the array F.  LDF >= max(1,M).

SCALE

         SCALE is SINGLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_csylv_dual

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 397 of file csylv_dual.c.

float mepack_single_residual_glyap (const char * TRANS, int M, float * A, int LDA, float * B, int LDB, float * X, int LDX, float * Y, int LDY, float SCALE)

Compute the relative residual for the generalized Lyapunov equation.

Purpose:

Compute the relative residual of the generalized Lyapunov equation

    RelRes = || SCALE*Y - op(A)*X*op(B)**T - op(B) * X * op(A)**T || / ( 2*||A||*||B||*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

         TRANS is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  op(A) = A (No transpose for A)
         == 'T':  op(A) = A**T (Transpose A)

M

         M is INTEGER
         The order of the matrices A.  M >= 0.

A

         A is SINGLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is SINGLE PRECISION array, dimension (LDB,M)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,M).

X

         X is SINGLE PRECISION array, dimension (LDX,M)
         Solution of the Lyapunov Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is SINGLE PRECISION array, dimension (LDX,M)
         The right hand side of the Lyapunov Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is SINGLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_glyap

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 239 of file glyap.c.

float mepack_single_residual_gstein (const char * TRANS, int M, float * A, int LDA, float * B, int LDB, float * X, int LDX, float * Y, int LDY, float SCALE)

Compute the relative residual for the generalized Stein equation.

Purpose:

Compute the relative residual of the generalized Stein equation

    RelRes = || SCALE*Y - op(A)*X*op(A)**T + op(B) * X * op(B)**T || / ( (||A||**2+||B||**2)*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

         TRANS is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  op(A) = A (No transpose for A)
         == 'T':  op(A) = A**T (Transpose A)

M

         M is INTEGER
         The order of the matrices A.  M >= 0.

A

         A is SINGLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is SINGLE PRECISION array, dimension (LDB,M)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,M).

X

         X is SINGLE PRECISION array, dimension (LDX,M)
         Solution of the Stein Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is SINGLE PRECISION array, dimension (LDX,M)
         The right hand side of the Stein Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is SINGLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_gstein

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 239 of file gstein.c.

float mepack_single_residual_gsylv (const char * TRANSA, const char * TRANSB, float sgn, int M, int N, float * A, int LDA, float * B, int LDB, float * C, int LDC, float * D, int LDD, float * X, int LDX, float * Y, int LDY, float SCALE)

Compute the relative residual for the generalized Sylvester equation.

Purpose:

Compute the relative residual of the generalized Sylvester equation

    RelRes = || SCALE*Y - opA(A)*X *opB(B) - SGN * opA(C) * X * opB(D) || / ( (||A||*||B||+||C||*||D||)*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN

         SGN is SINGLE PRECISION, allowed values: +/-1
         Specifies the sign between the two parts of the Sylvester equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is SINGLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is SINGLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

C

         C is SINGLE PRECISION array, dimension (LDC,M)
         The coefficient matrix C.

LDC

         LDC is INTEGER
         The leading dimension of the array C.  LDC >= max(1,M).

D

         D is SINGLE PRECISION array, dimension (LDD,N)
         The coefficient matrix D.

LDD

         LDD is INTEGER
         The leading dimension of the array D.  LDD >= max(1,N).

X

         X is SINGLE PRECISION array, dimension (LDY,M)
         Solution of the Sylvester Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is SINGLE PRECISION array, dimension (LDY,N)
         The right hand side of the Sylvester Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is SINGLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_gsylv

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 331 of file gsylv.c.

float mepack_single_residual_lyap (const char * TRANS, int M, float * A, int LDA, float * X, int LDX, float * Y, int LDY, float SCALE)

Compute the relative residual for the Lyapunov equation.

Purpose:

Compute the relative residual of the Lyapunov equation

    RelRes = || SCALE*Y - op(A)*X - X * op(A)**T || / ( 2*||A||*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

         TRANS is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  op(A) = A (No transpose for A)
         == 'T':  op(A) = A**T (Transpose A)

M

         M is INTEGER
         The order of the matrices A.  M >= 0.

A

         A is SINGLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

X

         X is SINGLE PRECISION array, dimension (LDX,M)
         Solution of the Lyapunov Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is SINGLE PRECISION array, dimension (LDX,M)
         The right hand side of the Lyapunov Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is SINGLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_lyap

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 213 of file lyap.c.

float mepack_single_residual_stein (const char * TRANS, int M, float * A, int LDA, float * X, int LDX, float * Y, int LDY, float SCALE)

Compute the relative residual for the Stein equation.

Purpose:

Compute the relative residual of the Stein equation

    RelRes = || SCALE*Y - op(A)*X*op(A)**T + X || / ( (||A||**2+1) * ||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANS

         TRANS is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  op(A) = A (No transpose for A)
         == 'T':  op(A) = A**T (Transpose A)

M

         M is INTEGER
         The order of the matrices A.  M >= 0.

A

         A is SINGLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

X

         X is SINGLE PRECISION array, dimension (LDX,M)
         Solution of the Stein Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is SINGLE PRECISION array, dimension (LDX,M)
         The right hand side of the Stein Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is SINGLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_stein

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 213 of file stein.c.

float mepack_single_residual_sylv (const char * TRANSA, const char * TRANSB, float sgn, int M, int N, float * A, int LDA, float * B, int LDB, float * X, int LDX, float * Y, int LDY, float SCALE)

Compute the relative residual for the Sylvester equation.

Purpose:

Compute the relative residual of the Sylvester equation

    RelRes = || SCALE*Y - opA(A)*X - SGN * X * opB(B) || / ( (||A||+||B||)*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN

         SGN is DOUBLE PRECISION, allowed values: +/-1
         Specifies the sign between the two parts of the Sylvester equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is DOUBLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is DOUBLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

X

         X is DOUBLE PRECISION array, dimension (LDX,M)
         Solution of the Sylvester Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is DOUBLE PRECISION array, dimension (LDX,M)
         The right hand side of the Sylvester Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is DOUBLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_sylv

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 282 of file sylv.c.

float mepack_single_residual_sylv2 (const char * TRANSA, const char * TRANSB, float sgn, int M, int N, float * A, int LDA, float * B, int LDB, float * X, int LDX, float * Y, int LDY, float SCALE)

Compute the relative residual for the discrete-time Sylvester equation.

Purpose:

Compute the relative residual of the discrete-time Sylvester equation

    RelRes = || SCALE*Y - opA(A)*X*opB(B) - SGN* X  || / ( (||A||*||B||+1)*||X|| + SCALE * ||Y|| )     (1)

The norms are evaluated in terms of the Frobenius norm.
Remarks

Auxiliary memory is managed by the function itself.

Parameters

TRANSA

         TRANSA is CHARACTER(1)
         Specifies the form of the system of equations with respect to A :
         == 'N':  opA(A) = A (No transpose for A)
         == 'T':  opA(A) = A**T (Transpose A)

TRANSB

         TRANSB is CHARACTER(1)
         Specifies the form of the system of equations with respect to B :
         == 'N':  opB(B) = B (No transpose for B)
         == 'T':  opB(B) = B**T (Transpose B)

SGN

         SGN is SINGLE PRECISION, allowed values: +/-1
         Specifies the sign between the two parts of the Sylvester equation.

M

         M is INTEGER
         The order of the matrix A.  M >= 0.

N

         N is INTEGER
         The order of the matrix B.  N >= 0.

A

         A is SINGLE PRECISION array, dimension (LDA,M)
         The coefficient matrix A.

LDA

         LDA is INTEGER
         The leading dimension of the array A.  LDA >= max(1,M).

B

         B is SINGLE PRECISION array, dimension (LDB,N)
         The coefficient matrix B.

LDB

         LDB is INTEGER
         The leading dimension of the array B.  LDB >= max(1,N).

X

         X is SINGLE PRECISION array, dimension (LDX,M)
         Solution of the Sylvester Equation.

LDX

         LDX is INTEGER
         The leading dimension of the array X.  LDX >= max(1,M).

Y

         Y is SINGLE PRECISION array, dimension (LDX,M)
         The right hand side of the Sylvester Equation.

LDY

         LDY is INTEGER
         The leading dimension of the array Y.  LDY >= max(1,M).

SCALE

         SCALE is SINGLE PRECISION
         SCALE is a scaling factor to prevent the overflow in the result.

Returns

         The function returns the relative residual as defined in (1). If an error
         occurs a negative integer I is returned, signalizing that the parameter -I
         has a wrong/illegal value. If I = -1000, the auxiliary memory could not be allocated.
See also

sla_residual_sylv2

Author

Martin Koehler, MPI Magdeburg

Date

January 2024

Definition at line 282 of file sylv2.c.

Author

Generated automatically by Doxygen for MEPACK from the source code.

Info

Fri Feb 2 2024 00:00:00 Version 1.1.1 MEPACK