Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions ArithmeticServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,5 @@ console.log('running - listening on port ', port);


function fibonaci(n) {
if ((1 == n) || (0 == n) ) {
return 1;
}
else {
return (fibonaci(n-1) + fibonaci(n-2));
}
return(Math.pow((1+Math.sqrt(5))/2,n)-Math.pow((1-Math.sqrt(5))/2,n))/Math.sqrt(5);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit tests!

}
7 changes: 1 addition & 6 deletions Fibo1.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
* Created by User on 3/17/14.
*/
function fibonaci(n) {
if ((1 == n) || (0 == n) ) {
return 1;
}
else {
return (fibonaci(n-1) + fibonaci(n-2));
}
return (Math.pow((1+Math.sqrt(5))/2,n)-Math.pow((1-Math.sqrt(5))/2,n))/Math.sqrt(5);
}

console.log('num is', fibonaci(20));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please log properly using loacker

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the PR's with minimal changes, if you think we should change this log please create a separate PR for it
@MoLow