Program s15agfe
! S15AGF Example Program Text
! Mark 27.3 Release. NAG Copyright 2021.
! .. Use Statements ..
Use nag_library, Only: nag_wp, s15agf
! .. Implicit None Statement ..
Implicit None
! .. Parameters ..
Integer, Parameter :: nin = 5, nout = 6
! .. Local Scalars ..
Real (Kind=nag_wp) :: x, y
Integer :: ifail, ioerr
! .. Executable Statements ..
Write (nout,*) 'S15AGF Example Program Results'
! Skip heading in data file
Read (nin,*)
Write (nout,*)
Write (nout,*) ' X erfcx(X)'
Write (nout,*)
data: Do
Read (nin,*,Iostat=ioerr) x
If (ioerr<0) Then
Exit data
End If
ifail = -1
y = s15agf(x,ifail)
If (ifail<0) Then
Exit data
End If
Write (nout,99999) x, y
End Do data
99999 Format (1X,1P,2(1X,E13.5))
End Program s15agfe