NAG Library Manual, Mark 28.7
```    Program f06pa_t1w_fe

!     F06PA_T1W_F Example Program Text

!     Mark 28.7 Release. NAG Copyright 2022.

!     .. Use Statements ..
Use iso_c_binding, Only: c_ptr
Assignment (=)
Use nag_library, Only: nag_wp, x04caf
!     .. Implicit None Statement ..
Implicit None
!     .. Parameters ..
Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
Real (Kind=nag_wp)               :: alphar, betar
Integer                          :: i, ifail, lda, m, n
!     .. Local Arrays ..
Type (nagad_t1w_w_rtype), Allocatable :: a(:,:), b(:), y(:), y_in(:)
Real (Kind=nag_wp), Allocatable  :: ar(:,:), br(:), da(:), db(:), yr(:)
!     .. Executable Statements ..
Write (nout,*) 'F06PA_T1W_F Example Program Results'
Write (nout,*)
!     Skip heading in data file
alpha = alphar
beta = betar
lda = m
Allocate (a(lda,n),b(m),y(n),y_in(n))
Allocate (ar(lda,n),br(m),yr(n),da(n),db(n))

!     Read the m by n matrix A from data file

!     Read the vector to be multiplied by A
yr = 1.0_nag_wp
y_in = yr

!     Create AD configuration data object
ifail = 0

a = ar
b = br

y(1:n) = y_in(1:n)
ifail = 0

Write (nout,*)
Write (nout,*) 'Product solution y = beta*y + alpha*A^T*b:'
yr = y
Write (nout,99999) yr(1:n)
99999 Format (4X,F11.4)

!     Get derivatives
da(1:n) = y(1:n)%tangent

alpha = alphar
beta = betar

y(1:n) = y_in(1:n)
ifail = 0
db(1:n) = y(1:n)%tangent

Write (nout,*)
Write (nout,*) ' Derivatives calculated: First order tangentss'
Write (nout,*) ' Computational mode    : algorithmic'

Write (nout,*)
Write (nout,*) ' Derivatives of y w.r.t. alpha and beta'
Write (nout,*)

!     Setup evaluation of derivatives via adjoints
Call x04caf('General',' ',1,n,da,1,'       dy/dalpha',ifail)
Write (nout,*)
Call x04caf('General',' ',1,n,db,1,'       dy/dbeta',ifail)

!     Remove computational data object