! Cu "sub_Pol" si "polval" pt. polinoame
! met. JARRATT
! u =f/f'
! om1 =f'
! om2 =f'(x+alfa*u)
! om3 =f'(x +beta*u +gama*f/om2)

subroutine sub(x, f, om1, om2, om3)
use work

! Stationar:
!f0(x) =7*x -5*x*cos(x)+3*sin(x)
!f1(x) =7-2*cos(x)+5*x*sin(x)       !7-5*cos(x)+5*x*sin(x)+3*cos(x)

!! Ozban 2004:
!!sin2(x) - x2 + 1 =0; alfa = 1.404491648215341
!f0(x) =sin(x)*sin(x) - x*x + 1
!f1(x) =2*sin(x)*cos(x) -2*x

!Ex. 2
 f0(x)  =2*x*cos(x) +x -3
 f1(x) =2*cos(x) -2*x*sin(x) +1
 
 
f   =f0(x)
om1 =f1(x)

u =f/om1   ! f/f'

x2 =x +alfa*u
om2 =f1(x2)

if(order >3) then
x3 =x +beta*u +gama*f/om2
om3 =f1(x3)
endif

END
