In article <pan.2009.02.10.22.26...@remove.this.cybersource.com.au>, Steven D'Aprano <ste...@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 cost. -- http://mail.python.org/mailman/listinfo/python-list
- Re: can multi-core improve single funciton? sturlamolden
- Re: can multi-core improve single funciton? Lie Ryan
- Re: can multi-core improve single funciton? Steven D'Aprano
- Re: can multi-core improve single funciton? Steven D'Aprano
- Re: can multi-core improve single funciton? Gerhard Weis
- Re: can multi-core improve single funciton? Steven D'Aprano
- Re: can multi-core improve single funciton? Gabriel Genellina
- Re: can multi-core improve single funciton? Chris Rebert
- Re: can multi-core improve single funciton? Niklas Norrthon
- Re: can multi-core improve single funci... Steven D'Aprano
- Re: can multi-core improve single ... Cameron Laird
- Re: can multi-core improve sin... Steven D'Aprano
- Re: can multi-core improve sin... Cameron Laird
- Re: can multi-core improve single funciton? Gerhard Weis
- Re: can multi-core improve single funci... Steven D'Aprano
- Re: can multi-core improve single ... Gerhard Weis
- Re: can multi-core improve single funciton? oyster
- Re: can multi-core improve single funciton? James Mills
- Re: can multi-core improve single funciton? Chris Rebert
- Re: can multi-core improve single funciton? Paul Rubin
- Re: can multi-core improve single funciton? sturlamolden