@@ -911,7 +911,7 @@ subroutine illinois(me,ax,bx,fax,fbx,xzero,fzero,iflag)
911
911
real (wp),intent (out ) :: fzero ! ! value of `f` at the root (`f(xzero)`)
912
912
integer ,intent (out ) :: iflag ! ! status flag (`0`=root found, `-2`=max iterations reached)
913
913
914
- real (wp) :: x1,x2,x3,f1,f2,f3,delta, f1tmp
914
+ real (wp) :: x1,x2,x3,f1,f2,f3,f1tmp
915
915
integer :: i ! ! iteration counter
916
916
logical :: root_found ! ! convergence in x
917
917
@@ -1001,14 +1001,14 @@ subroutine anderson_bjorck(me,ax,bx,fax,fbx,xzero,fzero,iflag)
1001
1001
1002
1002
! determine a new inclusion interval:
1003
1003
if (f2* f3< 0.0_wp ) then
1004
- ! zero lies between x2 and x3
1004
+ ! zero lies between x2 and x3 ! x1-----x3--*--x2
1005
1005
x1 = x2
1006
1006
x2 = x3
1007
1007
f1 = f2
1008
1008
f2 = f3
1009
- f1tmp = f1
1009
+ f1tmp = f2
1010
1010
else
1011
- ! zero lies between x1 and x3
1011
+ ! zero lies between x1 and x3 ! x1--*--x3-----x2
1012
1012
g = 1.0_wp - f3/ f2
1013
1013
if (g<= 0.0_wp ) g = 0.5_wp
1014
1014
x2 = x3
@@ -2211,7 +2211,7 @@ subroutine anderson_bjorck_kroger(me,ax,bx,fax,fbx,xzero,fzero,iflag)
2211
2211
x2 = x3
2212
2212
f1 = f2
2213
2213
f2 = f3
2214
- f1tmp = f1
2214
+ f1tmp = f2
2215
2215
else
2216
2216
! zero lies between x1 and x3
2217
2217
g = 1.0_wp - f3/ f2
0 commit comments