! 2.4.f90 ! $Id: 2.4.f90 1.2 2024/12/07 04:11:19 s Exp $ ! real function f(x) f=-1.0+x+x**2 end real function fdash(x) fdash=1.0+2.0*x end ! ! main ! real l0,l1,l2,l3,l4 character*10 keisen keisen='----------' l0=1.0 l1=l0-f(l0)/fdash(l0) l2=l1-f(l1)/fdash(l1) l3=l2-f(l2)/fdash(l2) l4=l3-f(l3)/fdash(l3) ! output print *, '2.4.f90' print '(4a10)', 'n','lamda(n)','f(lamda)',"f'(lamda)" print '(4a10)', keisen,keisen,keisen,keisen print '(i10,3f10.7)', 0,l0,f(l0),fdash(l0) print '(i10,3f10.7)', 1,l1,f(l1),fdash(l1) print '(i10,3f10.7)', 2,l2,f(l2),fdash(l2) print '(i10,3f10.7)', 3,l3,f(l3),fdash(l3) print '(i10,3f10.7)', 4,l4,f(l4),fdash(l4) print '(4a10)', keisen,keisen,keisen,keisen stop end ! end of 2.4.f90