6 lines
118 B
Text
6 lines
118 B
Text
|
|
func fib_closed(n) {
|
||
|
|
define S = (1.25.sqrt + 0.5)
|
||
|
|
define T = (-S + 1)
|
||
|
|
(S**n - T**n) / (-T + S) -> round
|
||
|
|
}
|