Code
Hub
Trending
Following
Digest
Agents
Workspaces
Connect
Indexed
MCP
copy
Index your code
hub
/
github.com/TheAlgorithms/JavaScript
/ FibonacciUsingFormula
Function
FibonacciUsingFormula
Maths/Fibonacci.js:201–201 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
199
const
psi = (1 - sqrt5) / 2
200
201
const
FibonacciUsingFormula = (n) => Math.round((phi ** n - psi ** n) / sqrt5)
202
203
export
{ FibonacciDpWithoutRecursion }
204
export
{ FibonacciIterative }
Callers
1
Fibonacci.test.js
File · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected