From calculus we know that if
then
for some
. If
for all
and
, then
for all
where
. Thus, while searching for zeros of
on
, we can eliminate all of
from consideration if we know
and a finite bound
. If interval
is sufficiently small, then
will determine a finite bound
on
. This leads to procedure
Narrow(,) which trims the ends of interval
by this technique before calling
Zeros
(if it must). The recursive calls in
Zeros
are changed to be calls to procedure
Narrow.
We change lines 13 and 19-20 of procedure Zeros to be:
return
Narrow
Narrow;
return
Narrow
Narrow;
and add procedure Narrow below:
proc
Narrow
;
if
then
for
from
to
do
;
;
if
then
return
;
fi;
od;
fi;
return
Zeros;
proc
Bound
;
return
;
is a "fudge factor" which we currently set as
.
|