What's Here?
- Members: 307,151
- Replies: 841,908
- Topics: 140,699
- Snippets: 4,468
- Tutorials: 1,166
- Total Online: 1,693
- Members: 101
- Guests: 1,592
|
's Contributions
|
Below are the tutorials, code snippets, and resources has submitted to dream.in.code. For more information on Kudos and contributing to dream.in.code visit: http://home.dreamincode.net/?p=about#kudos.
|
|
Tutorials
in (Last Comment: , Views: 12,871)
|
|
Code Snippets
|
 |
|
|
Submitted: July 6, 2008
Views: 1069
An implementation of the Fibonacci number calculation that is both fast and memory efficient.
fib(0)=0
fib(1)=1
Basic formula taken from Ralph P. Grimaldi's Discrete and Combinatorial Mathematics, 4th edition.
This is pretty much the fastest way if you want to know a single Fibonacci number. If you want to calculate the whole series, a simple loop that adds the previous two numbers is probably faster.
|
|
|
 |
|
|
Submitted: July 11, 2008
Views: 1027
Calculates the Nth Pythagorean triple (see http://en.wikipedia.org/wiki/Pythagorean_triple ), or determines the rest of the triple if only one of the 3 is known.
|
|
|
| |