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

NAG FL Interface Introduction
Example description
    Program x03abfe

!     X03ABF Example Program Text

!     Mark 30.0 Release. NAG Copyright 2024.

!     .. Use Statements ..
      Use nag_library, Only: nag_wp, x03abf
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: n = 3, nin = 5, nout = 6
!     .. Local Scalars ..
      Complex (Kind=nag_wp)            :: cx, dx
      Integer                          :: i, ifail, isizea, isizeb, istepa,    &
                                          istepb, j
      Logical                          :: sw
!     .. Local Arrays ..
      Complex (Kind=nag_wp)            :: a(n,n), b(n)
!     .. Executable Statements ..
      Write (nout,*) 'X03ABF 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)
      cx = (1.0E0_nag_wp,1.0E0_nag_wp)
      isizea = n
      isizeb = n
      istepa = 1
      istepb = 1
      sw = .True.

      ifail = 0
      Call x03abf(a(1,2),isizea,b,isizeb,n,istepa,istepb,cx,dx,sw,ifail)

      Write (nout,*)
      Write (nout,99999) 'Result = ', dx

99999 Format (1X,A,'(',F3.0,',',F3.0,')')
    End Program x03abfe