Fibonacci sequence: Difference between revisions
Content deleted Content added
+D |
→{{header|D}}: Fixed English |
||
Line 39:
=={{header|D}}==
Here are four
''FibD'' has an argument limit of magnitude 82 due to floating point precision, the others have a limit of 92 due to overflow (long).<br>
The traditional recursive version is inefficient. It is optimized by supplying a static storage to store intermediate results.<br>
All four functions have
<d>module fibonacci ;
import std.stdio ;
Line 96:
I : 99194853094755497 <- 61305790721611591 + 37889062373143906
O : 99194853094755497 <- 61305790721611591 + 37889062373143906</pre>
=={{header|Forth}}==
: fib ( n -- fib )
|