Program s20aqfe
! S20AQF Example Program Text
! Mark 29.3 Release. NAG Copyright 2023.
! .. Use Statements ..
Use nag_library, Only: nag_wp, s20aqf
! .. Implicit None Statement ..
Implicit None
! .. Parameters ..
Integer, Parameter :: nin = 5, nout = 6
! .. Local Scalars ..
Integer :: i, ifail, n
! .. Local Arrays ..
Real (Kind=nag_wp), Allocatable :: f(:), x(:)
! .. Executable Statements ..
Write (nout,*) 'S20AQF Example Program Results'
! Skip heading in data file
Read (nin,*)
Write (nout,*)
Write (nout,*) ' X F'
Write (nout,*)
Read (nin,*) n
Allocate (x(n),f(n))
Read (nin,*) x(1:n)
ifail = 0
Call s20aqf(n,x,f,ifail)
Do i = 1, n
Write (nout,99999) x(i), f(i)
End Do
99999 Format (1X,1P,2E12.3)
End Program s20aqfe