On Nov 25, 2007 2:47 PM, Dick Moores <[EMAIL PROTECTED]> wrote: > Wow. your f() is ingenious, Frederik. Thanks very much. > > Any more tricks up your sleeve? You did say a post or so ago, > "Further improvements are possible."
The next improvement would be to find a recurrence formula for the terms instead of computing them directly. So for example, if summing over c[n] = x**n / n!, instead of computing c[n] = x**n / factorial(n) for each n, you'd compute c[0] and then just do c[n] = c[n-1] * x / n for each of the remaining terms. Fredrik -- http://mail.python.org/mailman/listinfo/python-list