NAG Library Manual, Mark 28.4
```    Program f08ga_a1w_fe

!     F08GA_A1W_F Example Program Text
!     Mark 28.4 Release. NAG Copyright 2022.

!     .. Use Statements ..
Use iso_c_binding, Only: c_ptr
Use nagad_library, Only: abs, f08ga_a1w_f, max,                          &
Assignment (=), Operator (*)
Use nag_library, Only: nag_wp, x02ajf, x04caf
!     .. Implicit None Statement ..
Implicit None
!     .. Parameters ..
Integer, Parameter               :: nin = 5, nout = 6
Character (1), Parameter         :: uplo = 'U'
!     .. Local Scalars ..
Integer                          :: i, ifail, info, j, n
!     .. Local Arrays ..
Type (nagad_a1w_w_rtype), Allocatable :: ap(:), ap_in(:), w(:), work(:)
Real (Kind=nag_wp), Allocatable  :: dwda(:,:)
!     .. Executable Statements ..
Write (nout,*) 'F08GA_A1W_F Example Program Results'
Write (nout,*)
!     Skip heading in data file

Allocate (ap((n*(n+1))/2),w(n),work(3*n))
Allocate (ap_in((n*(n+1))/2),dwda(n,n))

ifail = 0
!     Read the upper triangular part of the matrix A from data file

ap = ap_in

!     Solve the symmetric eigenvalue problem
!     The NAG name equivalent of dspev_a1w is f08ga_a1w_f

If (info==0) Then

!       Print solution

Write (nout,*) 'Eigenvalues'
Write (nout,99999) w(1:n)%value

!       Get the machine precision, EPS and compute the approximate
!       error bound for the computed eigenvalues.  Note that for
!       the 2-norm, max( abs(W(i)) ) = norm(A), and since the
!       eigenvalues are returned in ascending order
!       max( abs(W(i)) ) = max( abs(W(1)), abs(W(n)))

eps = x02ajf()
eerrbd = eps*max(abs(w(1)),abs(w(n)))

!       Print the approximate error bound for the eigenvalues

Write (nout,*)
Write (nout,*) 'Error estimate for the eigenvalues'
Write (nout,99998) eerrbd%value
Else
Write (nout,99997) 'Failure in DSPEV_A1W. INFO =', info
Go To 100
End If

Do i = 1, n

Do j = 1, n
End Do
End Do

Write (nout,*)
Write (nout,*) 'Derivatives of eigenvalues w.r.t. diagonal of A'
ifail = 0
Call x04caf('General',' ',n,n,dwda,n,'dW_i/dA_jj',ifail)

100   Continue