Program g01ebfe
! G01EBF Example Program Text
! Mark 26.1 Release. NAG Copyright 2016.
! .. Use Statements ..
Use nag_library, Only: g01ebf, nag_wp
! .. Implicit None Statement ..
Implicit None
! .. Parameters ..
Integer, Parameter :: nin = 5, nout = 6
! .. Local Scalars ..
Real (Kind=nag_wp) :: df, prob, t
Integer :: ifail
Character (1) :: tail
! .. Executable Statements ..
Write (nout,*) 'G01EBF Example Program Results'
Write (nout,*)
! Skip heading in data file
Read (nin,*)
! Display titles
Write (nout,*) ' TAIL T DF Probability'
Write (nout,*)
d_lp: Do
Read (nin,*,Iostat=ifail) tail, t, df
If (ifail/=0) Then
Exit d_lp
End If
! Calculate probability
ifail = 0
prob = g01ebf(tail,t,df,ifail)
! Display results
Write (nout,99999) tail, t, df, prob
End Do d_lp
99999 Format (3X,A1,4X,F6.3,F8.1,7X,F7.4)
End Program g01ebfe