Special.Fibonacci Method

Returns the nth Fibonacci number.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public static long Fibonacci(
	int n
)

Parameters

n  Int32
The index of the number in the Fibonacci sequence.

Return Value

Int64
A long integer that equals the nth Fibonacci number.

Remarks

The Fibonacci sequence is defined by the initial values, F0= 0 and F1= 1, and the recurrence relation Fn+1= Fn + Fn–1.

See Also