Program c02alfe
! C02ALF Example Program Text
! Mark 29.1 Release. NAG Copyright 2023.
! .. Use Statements ..
Use nag_library, Only: c02alf, nag_wp
! .. Implicit None Statement ..
Implicit None
! .. Parameters ..
Integer, Parameter :: nin = 5, nout = 6
! .. Local Scalars ..
Real (Kind=nag_wp) :: a, b, c, d, e
Integer :: i, ifail
! .. Local Arrays ..
Real (Kind=nag_wp) :: errest(4), zeroi(4), zeror(4)
! .. Executable Statements ..
Write (nout,*) 'C02ALF Example Program Results'
! Skip heading in data file
Read (nin,*)
Read (nin,*) e, a, b, c, d
ifail = 0
Call c02alf(e,a,b,c,d,zeror,zeroi,errest,ifail)
Write (nout,*)
Write (nout,*) ' Roots of quartic equation ', &
' Error estimates'
Write (nout,*) ' ', &
' (machine-dependent)'
Write (nout,*)
Do i = 1, 4
Write (nout,99999) ' z = ', zeror(i), zeroi(i), '*i', errest(i)
End Do
99999 Format (1X,A,1P,E12.4,Sp,E12.4,A,8X,Ss,E9.1)
End Program c02alfe