Back to Symbolic Math (SymEngine)
sym.fibonacci2
Computes F(n) and F(n-1) simultaneously.
Syntax
sym.fibonacci2(n)
Description
Computes F(n) and F(n-1) simultaneously. More efficient when you need both values.
Parameters
| Name | Description |
|---|---|
| n | - The index (must be positive). |
Returns
{ fn: Expr; fn1: Expr; }