NAG Library Manual, Mark 28.3
Interfaces:  FL   CL   CPP   AD 

NAG FL Interface Introduction
Example description
    Program x03aafe

!     X03AAF Example Program Text

!     Mark 28.3 Release. NAG Copyright 2022.

!     .. Use Statements ..
      Use nag_library, Only: nag_wp, x03aaf
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: n = 3, nin = 5, nout = 6
!     .. Local Scalars ..
      Real (Kind=nag_wp)               :: c1, c2, d1, d2
      Integer                          :: i, ifail, isizea, isizeb, istepa,    &
                                          istepb, j
      Logical                          :: sw
!     .. Local Arrays ..
      Real (Kind=nag_wp)               :: a(n,n), b(n)
!     .. Executable Statements ..
      Write (nout,*) 'X03AAF Example Program Results'

!     Skip heading in data file
      Read (nin,*)

      Read (nin,*)((a(i,j),j=1,n),i=1,n), (b(i),i=1,n)
      c1 = 1.0E0_nag_wp
      c2 = 0.0E0_nag_wp
      isizea = n
      isizeb = n
      istepa = 1
      istepb = 1
      sw = .True.

      ifail = 0
      Call x03aaf(a(1,2),isizea,b,isizeb,n,istepa,istepb,c1,c2,d1,d2,sw,ifail)

      Write (nout,*)
      Write (nout,99999) 'D1 = ', d1, ' D2 = ', d2

99999 Format (1X,A,F4.1,A,F4.1)
    End Program x03aafe