Hi, > > I'm looking for a piece of code, preferably in Python, that will do > the following. It will accept a few data points (x,f(x)) of a function > that converges to some finite value when x converges to infinity. I > need the algorithm to guess what that limit is, to whatever precision > it can. > > For example, if the input is: > > [ > [1,8], > [2,7.5], > [3,7.25], > [4,7.125] > ] > > Then the output will be 7. Or at least something close. > > Does anyone know anything like that?
It is obvious that in general this is an unsolvable problem. But if you know for some reason that your series/functions are "well behaved" in some sense it still might be possible to do something reasonable and there has some work been done on these things. You might e.g. google for Wynns epsilon method which gives some examples and references for related stuff. hth, albert -- http://mail.python.org/mailman/listinfo/python-list