Back to Symbolic Math (SymEngine)
sym.fibonacci
Computes the nth Fibonacci number.
Syntax
sym.fibonacci(n)
Description
Computes the nth Fibonacci number. F(0) = 0, F(1) = 1, F(n) = F(n-1) + F(n-2)
Parameters
| Name | Description |
|---|---|
| n | - The index (must be non-negative). |
Returns
Expr