---
name: "cspt01.f"
section: "3"
platform: "linux"
package: "lapack-doc"
version: "3.12.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/cspt01.f"
---

# cspt01.f(3)

## NAME

TESTING/LIN/cspt01.f

## SYNOPSIS

### Functions/Subroutines

subroutine **cspt01** (uplo, n, a, afac, ipiv, c, ldc, rwork, resid)\
 **CSPT01**

## Function/Subroutine Documentation

### subroutine cspt01 (character uplo, integer n, complex, dimension( \* ) a, complex, dimension( \* ) afac, integer, dimension( \* ) ipiv, complex, dimension( ldc, \* ) c, integer ldc, real, dimension( \* ) rwork, real resid)

**CSPT01**

**Purpose:**

```
!>
!> CSPT01 reconstructs a symmetric indefinite packed matrix A from its
!> diagonal pivoting factorization A = U*D*U' or A = L*D*L' and computes
!> the residual
!>    norm( C - A ) / ( N * norm(A) * EPS ),
!> where C is the reconstructed matrix and EPS is the machine epsilon.
!>
```

**Parameters**

*UPLO*

```
!>          UPLO is CHARACTER*1
!>          Specifies whether the upper or lower triangular part of the
!>          Hermitian matrix A is stored:
!>          = 'U':  Upper triangular
!>          = 'L':  Lower triangular
!>
```

*N*

```
!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>
```

*A*

```
!>          A is COMPLEX array, dimension (N*(N+1)/2)
!>          The original symmetric matrix A, stored as a packed
!>          triangular matrix.
!>
```

*AFAC*

```
!>          AFAC is COMPLEX array, dimension (N*(N+1)/2)
!>          The factored form of the matrix A, stored as a packed
!>          triangular matrix.  AFAC contains the block diagonal matrix D
!>          and the multipliers used to obtain the factor L or U from the
!>          L*D*L' or U*D*U' factorization as computed by CSPTRF.
!>
```

*IPIV*

```
!>          IPIV is INTEGER array, dimension (N)
!>          The pivot indices from CSPTRF.
!>
```

*C*

```
!>          C is COMPLEX array, dimension (LDC,N)
!>
```

*LDC*

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

*RWORK*

```
!>          RWORK is REAL array, dimension (N)
!>
```

*RESID*

```
!>          RESID is REAL
!>          If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
!>          If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
!>
```

**Author**

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line **111** of file **cspt01.f**.

## Author

Generated automatically by Doxygen for LAPACK from the source code.
