NAG Library Manual, Mark 27.2
```    Program d01ga_t1w_fe

!     D01GA_T1W_F Example Program Text
!     Mark 27.2 Release. NAG Copyright 2021.

!     .. Use Statements ..
Use iso_c_binding, Only: c_ptr
x10ab_t1w_f, Assignment (=), Operator (/),      &
Operator (+), Operator (*)
Use nag_library, Only: nag_wp
!     .. Implicit None Statement ..
Implicit None
!     .. Parameters ..
Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
Type (nagad_t1w_w_rtype)         :: a, ans, er
Real (Kind=nag_wp)               :: ar, da, xr
Integer                          :: i, ifail, n
!     .. Local Arrays ..
Type (nagad_t1w_w_rtype), Allocatable :: x(:), y(:)
!     .. Intrinsic Procedures ..
Intrinsic                        :: real
!     .. Executable Statements ..

Write (nout,*) 'D01GA_T1W_F Example Program Results'

!     Skip heading in data file

a = ar
Allocate (x(n),y(n))

!     Create AD configuration data object
ifail = 0

a%tangent = 1.0_nag_wp
Do i = 1, n
xr = real(i-1,kind=nag_wp)/real(n-1,kind=nag_wp)
x(i) = xr
y(i) = 4.0_nag_wp/(1.0_nag_wp+a*a*xr*xr)
End Do

ifail = 0

Write (nout,*)
Write (nout,99999) ' Solution, ans =', ans%value
Write (nout,*)

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

!     Get derivatives
da = ans%tangent

Write (nout,*) ' Derivatives of solution w.r.t a:'
Write (nout,*)
Write (nout,99998) '     d(ans)/da  = ', da
99999 Format (1X,A,1X,F12.5)
99998 Format (1X,A,E13.5)

!     Remove computational data object and tape
ifail = 0