#include <stdio.h>
Go to the source code of this file.
|
typedef unsigned long long int | ull_t |
| Shorthand for "unsigned long long int". More...
|
|
◆ ull_t
typedef unsigned long long int ull_t |
Shorthand for "unsigned long long int".
◆ Fibonacci()
ull_t Fibonacci |
( |
size_t |
n | ) |
|
Returns the nth fibonacci number.
- Parameters
-
n | The index of the fibonacci number to return |
- Returns
- The nth fibonacci number
- Note
- The function is only guaranteed to work for n >= 0. No checking is done that memory is available for the lookup table.
- Parameters
-
n | The index of the fibonacci number to return |
- Returns
- The nth fibonacci number
◆ FinalizeFibonacci()
void FinalizeFibonacci |
( |
void |
| ) |
|
Frees resources for Fibonacci.
- Note
- This function can be called multiple times. After calling Fibonacci, you will need to call this function again to free the resources.
◆ InitFibonacci()
int InitFibonacci |
( |
void |
| ) |
|
Initializes resources for Fibonacci.
- Returns
- 0 on success, -1 on failure to allocate memory