Program c02akfe
! C02AKF Example Program Text
! Mark 27.0 Release. NAG Copyright 2019.
! .. Use Statements ..
Use nag_library, Only: c02akf, nag_wp
! .. Implicit None Statement ..
Implicit None
! .. Parameters ..
Integer, Parameter :: nin = 5, nout = 6
! .. Local Scalars ..
Real (Kind=nag_wp) :: r, s, t, u
Integer :: i, ifail
! .. Local Arrays ..
Real (Kind=nag_wp) :: errest(3), zeroi(3), zeror(3)
! .. Executable Statements ..
Write (nout,*) 'C02AKF Example Program Results'
! Skip heading in data file
Read (nin,*)
Read (nin,*) u, r, s, t
ifail = 0
Call c02akf(u,r,s,t,zeror,zeroi,errest,ifail)
Write (nout,*)
Write (nout,*) ' Roots of cubic equation ', &
' Error estimates'
Write (nout,*) ' ', &
' (machine-dependent)'
Write (nout,*)
Do i = 1, 3
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 c02akfe