Special.Fibonacci Method
Returns the nth Fibonacci number.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
A long integer that equals the nth Fibonacci number.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
public static long Fibonacci(
int n
)
Parameters
- n Int32
- The index of the number in the Fibonacci sequence.
Return Value
Int64A 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.