[Numpy-discussion] stop criterion for an alternating signal
Charles R Harris
Mon May 4 12:45:03 CDT 2009
On Mon, May 4, 2009 at 10:59 AM, Nils Wagner
> On Mon, 4 May 2009 10:52:59 -0600
> Charles R Harris <email@example.com> wrote:
> > On Mon, May 4, 2009 at 10:48 AM, Nils Wagner
> > <firstname.lastname@example.org>wrote:
> >> Hi all,
> >> How can I define a stop criterion for an alternating
> >>series ?
> >> Any pointer would be appreciated.
> > Where does the series come from and what are you trying
> >to do?
> > Chuck
> The data come from an iterative process.
> I am looking for convergence criteria.
Well, the example didn't show convergence. If you are working on the
harmonic series it takes an awful lot of iterations to get anywhere. So if
your example is representative the algorithm needs fixing to accelerate the
convergence. Assuming it actually converges and I'm not convinced of that.
> It should be possible to stop the process after 10-15
When an alternating series converges there is a decreasing upper bound and
increasing lower bound and the difference goes to zero. Pick a cutoff and
quit when the bounds are less than that apart.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion