On Mon, May 4, 2009 at 10:59 AM, Nils Wagner <nwagner@iam.uni-stuttgart.de>wrote:

On Mon, 4 May 2009 10:52:59 -0600 Charles R Harris <charlesr.harris@gmail.com> wrote:

On Mon, May 4, 2009 at 10:48 AM, Nils Wagner <nwagner@iam.uni-stuttgart.de>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 iterations.

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. Chuck