can multi-core improve single funciton?
claird at lairds.us
Tue Feb 17 15:30:27 CET 2009
In article <pan.2009.02.10.22.26.39 at REMOVE.THIS.cybersource.com.au>,
Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> wrote:
>> And now for my version (which admitedly isn't really mine, and returns
>> slightly incorrect fib(n) for large values of n, due to the limited
>> floating point precision).
>The floating point version is nice, but it starts giving incorrect
>answers relatively early, from n=71. But if you don't need accurate
>results (a relative error of 3e-15 for n=71), it is very fast.
While my personal opinion is that it's silly to
characterize an error of 3e-15 as not "accurate",
I think more constructive is to focus on the fact
that the closed-form solution can be touched up
to give a precise integral solution, while re-
taining its (approximately) O(log n) run-time
More information about the Python-list