! Cu "sub_Pol" si "polval" pt. polinoame
subroutine sub(f, f1, f2, x)
! met. Halley
use work

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

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

END
