Update fibsTillNum.md

This commit is contained in:
Soorena
2017-12-22 17:10:51 +03:30
committed by GitHub
parent 53246ccc62
commit f43ce09e73

View File

@ -5,5 +5,5 @@ Returns the number of fibonnacci numbers till num(0 and num inclusive)
```js
const fibsTillNum = num =>
Math.ceil(Math.log(num * Math.sqrt(5) + 1/2) / Math.log((Math.sqrt(5)+1)/2))// fibonacci(5) -> [0,1,1,2,3]
\\ fibsTillNum(10) -> 7
// fibsTillNum(10) -> 7
```