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

NAG FL Interface Introduction
Example description
    Program g01etfe

!     G01ETF Example Program Text

!     Mark 29.3 Release. NAG Copyright 2023.

!     .. Use Statements ..
      Use nag_library, Only: a00acf, g01etf, nag_wp
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
      Real (Kind=nag_wp)               :: x, y
      Integer                          :: ifail
!     .. Executable Statements ..
      Write (nout,*) 'G01ETF Example Program Results'
      Write (nout,*)

!     Check for valid licence prior to calling G01ETF
      If (.Not. a00acf()) Then
        Write (nout,*) ' ** A valid licence key was not found'

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

!       Display titles
        Write (nout,*) '  X          Y'
        Write (nout,*)

d_lp:   Do
          Read (nin,*,Iostat=ifail) x
          If (ifail/=0) Then
            Exit d_lp
          End If

!         Compute the value of the Landau distribution function
          y = g01etf(x)

!         Display the results
          Write (nout,99999) x, y
        End Do d_lp
      End If

99999 Format (1X,F4.1,3X,1P,E12.4)
    End Program g01etfe