NAG Library Manual, Mark 28.7
```    Program f08me_p0w_fe

!     F08ME_P0W_F Example Program Text

!     Mark 28.7 Release. NAG Copyright 2022.

!     .. Use Statements ..
Use iso_c_binding, Only: c_ptr
Use nag_library, Only: nag_wp, x04caf
!     .. Implicit None Statement ..
Implicit None
!     .. Parameters ..
Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
Integer                          :: i, ifail, ldc, ldu, ldvt, n
Character (1)                    :: uplo
!     .. Local Arrays ..
Real (Kind=nag_wp), Allocatable  :: c(:,:), d(:), e(:), u(:,:), vt(:,:), &
work(:)
!     .. Executable Statements ..
Write (nout,*) 'F08ME_P0W_F Example Program Results'
!     Skip heading in data file
ldc = 1
ldu = n
ldvt = n
Allocate (c(ldc,1),d(n),e(n-1),u(ldu,n),vt(ldvt,n),work(4*n))

!     Read B from data file as d and e

!     Initialize U and VT to be the unit matrix
u = 0.0_nag_wp
vt = 0.0_nag_wp
Do i = 1, n
u(i,i) = 1.0_nag_wp
vt(i,i) = 1.0_nag_wp
End Do

!     Calculate the SVD of B
ifail = 0
ifail)

Write (nout,*)
!     Print singular values, left & right singular vectors

Write (nout,*) 'Singular values'
Write (nout,99999) d(1:n)
Write (nout,*)
Flush (nout)
ifail = 0
Call x04caf('General',' ',n,n,u,ldu,'Left singular vectors, by column',  &
ifail)

Write (nout,*)
Flush (nout)
ifail = 0
Call x04caf('General',' ',n,n,vt,ldvt,'Right singular vectors, by row',  &
ifail)

99999 Format (3X,(8F8.4))
End Program f08me_p0w_fe
```