Function reference · Special functions

fib

Returns a Fibonacci number.

Integer indexes are computed exactly, including negative ones. For a symbol, the call is returned unevaluated. The largest index is set by MAX_FIB_INPUT (see Settings).

Notation

fib(x)

Write it in an expression: nerdamer('fib(10)'), or in the Playground.

nerdamer.fib

nerdamer.fib(x: ExpressionInput): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

The 10th Fibonacci number.

fib(10)
// → 55
Open in Playground

A negative index.

fib(-4)
// → -3
Open in Playground

Large indexes are exact.

fib(100)
// → 354224848179261915075
Open in Playground

← Back to Function reference