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

NAG FL Interface Introduction
Example description
    Program e02bdfe

!     E02BDF Example Program Text

!     Mark 30.0 Release. NAG Copyright 2024.

!     .. Use Statements ..
      Use nag_library, Only: e02bdf, nag_wp
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
      Real (Kind=nag_wp)               :: dint
      Integer                          :: ifail, ncap, ncap7
!     .. Local Arrays ..
      Real (Kind=nag_wp), Allocatable  :: c(:), lamda(:)
!     .. Executable Statements ..
      Write (nout,*) 'E02BDF Example Program Results'

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

      Read (nin,*) ncap
      ncap7 = ncap + 7
      Allocate (lamda(ncap7),c(ncap7))

      Read (nin,*) lamda(1:ncap7)
      Read (nin,*) c(1:(ncap+3))

      ifail = 0
      Call e02bdf(ncap7,lamda,c,dint,ifail)

      Write (nout,*)
      Write (nout,99999) 'Definite integral = ', dint

99999 Format (1X,A,E11.3)
    End Program e02bdfe