<story><title>&quot;The worst algorithm in the world?&quot;</title><url>http://bosker.wordpress.com/2011/04/29/the-worst-algorithm-in-the-world/</url></story><parent_chain></parent_chain><comment><author>mynegation</author><text>Very good demonstration of subsequent improvements of a naive algorithm. To me that was somewhat depreciated by the fact that you can actually calculate n-the Fibonacci number using Binet&apos;s closed form formula (&lt;a href=&quot;http://en.wikipedia.org/wiki/Fibonacci_number#Closed-form_expression&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Fibonacci_number#Closed-form_ex...&lt;/a&gt;). You will need arbitrary precision arithmetic starting with certain &apos;n&apos; though, as IEEE 754 will not give you correct result.</text></comment>
<story><title>&quot;The worst algorithm in the world?&quot;</title><url>http://bosker.wordpress.com/2011/04/29/the-worst-algorithm-in-the-world/</url></story><parent_chain></parent_chain><comment><author>perlgeek</author><text>&amp;#62; It’s not just bad in the way that Bubble sort is a bad sorting algorithm; it’s bad in the way that Bogosort is a bad sorting algorithm.&lt;p&gt;Nonono, Bogosort is way worse than naive recursive fibonacci - the former doesn&apos;t even guarantee termination, recursive fibonacci still does.&lt;p&gt;If you want to calculate fibonacci numbers not as a misguided exercise in algorithms but actually efficiently, use an algebraic form: &lt;a href=&quot;http://en.wikipedia.org/wiki/Fibonacci_number#Computation_by_rounding&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Fibonacci_number#Computation_by...&lt;/a&gt;</text></comment>