MCPcopy 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

199const psi = (1 - sqrt5) / 2
200
201const FibonacciUsingFormula = (n) => Math.round((phi ** n - psi ** n) / sqrt5)
202
203export { FibonacciDpWithoutRecursion }
204export { FibonacciIterative }

Callers 1

Fibonacci.test.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected