NAG Library Manual, Mark 27.3
```!   E01DA_T1W_F Example Program Text
!   Mark 27.3 Release. NAG Copyright 2021.
Program e01da_t1w_fe

!     .. Use Statements ..
Use iso_c_binding, Only: c_ptr
Use nagad_library, Only: e01da_t1w_f, e02de_t1w_f,                       &
x10aa_t1w_f, x10ab_t1w_f, Assignment (=)
Use nag_library, Only: nag_wp
!     .. Implicit None Statement ..
Implicit None
!     .. Parameters ..
Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
Real (Kind=nag_wp)               :: dx, dy
Integer                          :: ifail, j, m, mx, my, px, py
!     .. Local Arrays ..
Type (nagad_t1w_w_rtype), Allocatable :: c(:), f(:,:), lamda(:), mu(:),  &
wrk(:), x(:), y(:)
Type (nagad_t1w_w_rtype)         :: ff(1), tx(1), ty(1)
Real (Kind=nag_wp), Allocatable  :: xr(:), yr(:)
Integer, Allocatable             :: iwrk(:)
!     .. Executable Statements ..
Write (nout,*) 'E01DA_T1W_F Example Program Results'

!     Skip heading in data file

!     Read the number of X points, MX, and the values of the
!     X co-ordinates.

Allocate (x(mx),xr(mx),lamda(mx+4))

x(1:mx) = xr(1:mx)

!     Read the number of Y points, MY, and the values of the
!     Y co-ordinates.

Allocate (y(my),yr(my),mu(my+4),c(mx*my),f(my,mx),wrk((mx+6)*(my+6)))
y(1:my) = yr(1:my)

!     Read the function values at the grid points.
Do j = 1, my
f(j,1:mx) = xr(1:mx)
End Do

!     Create AD configuration data object and set computational mode
ifail = 0
ifail = 0

!     Call AD Interpolating Function routine
ifail = 0

Deallocate (wrk)

!     Interpolant to be evaluated at a single point
m = 1
tx(1) = 1.4_nag_wp
ty(1) = 0.5_nag_wp

Allocate (wrk(py-4),iwrk(py-4))

ifail = 0
dx = ff(1)%tangent
tx(1)%tangent = 0.0_nag_wp
ff(1) = 0.0_nag_wp

ifail = 0
dy = ff(1)%tangent

Write (nout,*)
Write (nout,99999) tx(1)%value, ty(1)%value
Write (nout,99998) ff(1)%value
99999 Format (1X,' Spline fitted at point x = ',F6.2,' and y = ',F6.2)
99998 Format (1X,' Value of fitted spline   = ',F7.3)

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

Write (nout,*)
Write (nout,*) ' Derivatives of fitted value w.r.t. fit point:'
Write (nout,*)
Write (nout,*) '   dfit/dx    dfit/dy'
Write (nout,99997) dx, dy
99997 Format (1X,E12.5,1X,E12.5)

!     Remove computational data object and tape