Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoudbuzing committed Dec 21, 2018
1 parent d31ff97 commit 08e6bf9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
18 changes: 0 additions & 18 deletions Prototypes/Source/Compiler/Source/FibonacciNumber.wl

This file was deleted.

11 changes: 11 additions & 0 deletions Prototypes/Source/Compiler/Source/cFibonacci.wl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Function[ { Typed[n, "MachineInteger"] },
Module[{fibonacci},
fibonacci = Function[{a},
If[a > 2,
If[Mod[a, 2] === 0,
fibonacci[ Quotient[a, 2]]*(2*fibonacci[Quotient[a, 2] + 1] - fibonacci[Quotient[a, 2]]),
fibonacci[Quotient[a - 1, 2] + 1]^2 + fibonacci[Quotient[a - 1, 2]]^2],
1]];
fibonacci[n]
]
]

0 comments on commit 08e6bf9

Please sign in to comment.