Go to the source code of this file.
|
function | zeroin (ax, bx, f, tol) |
|
◆ zeroin()
function zeroin |
( |
|
ax, |
|
|
|
bx, |
|
|
external |
f, |
|
|
|
tol |
|
) |
| |
Definition at line 6 of file zeroin.f.
Referenced by cellave().
7 implicit double precision (a-h,o-z)
44 if (tol1 .gt. 1.d0)
go to 10
59 30
if (dabs(fc) .ge. dabs(fb))
go to 40
69 40 tol1 = 2.d0*eps*dabs(b) + 0.5*
tol 71 if (dabs(xm) .le. tol1)
go to 90
72 if (fb .eq. 0.d0)
go to 90
76 if (dabs(e) .lt. tol1)
go to 70
77 if (dabs(fa) .le. dabs(fb))
go to 70
81 if (a .ne. c)
go to 50
95 p = s*(2.d0*xm*q*(q - r) - (b - a)*(r - 1.d0))
96 q = (q - 1.d0)*(r - 1.d0)*(s - 1.d0)
100 60
if (p .gt. 0.d0) q = -q
105 if ((2.d0*p) .ge. (3.d0*xm*q - dabs(tol1*q)))
go to 70
106 if (p .ge. dabs(0.5*e*q))
go to 70
120 if (dabs(d) .gt. tol1) b = b + d
121 if (dabs(d) .le. tol1) b = b + dsign(tol1, xm)
123 if ((fb*(fc/dabs(fc))) .gt. 0.d0)
go to 20
function zeroin(ax, bx, f, tol)