Algorithms_in_C 1.0.0
Set of algorithms implemented in C.
|
Compute \(m^{mth}\) Fibonacci number using the formulae: More...
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
Functions | |
void | fib (unsigned long n, unsigned long *C, unsigned long *D) |
Get the \(n^{th}\) and \(n+1^{th}\) Fibonacci number using recursive half-interval decimation. More... | |
int | main (int argc, char *argv[]) |
main function More... | |
Compute \(m^{mth}\) Fibonacci number using the formulae:
\begin{eqnarray*} F_{2n-1} &=& F_n^2 + F_{n-1}^2 \\ F_{2n} &=& F_n\left(2F_{n-1} + F_n\right) \end{eqnarray*}
void fib | ( | unsigned long | n, |
unsigned long * | C, | ||
unsigned long * | D | ||
) |
Get the \(n^{th}\) and \(n+1^{th}\) Fibonacci number using recursive half-interval decimation.
[in] | n | index of Fibonacci number to get |
[out] | C | left half interval value - end result here. Cannot be NULL |
[out] | D | right half interval can be discarded at end and can be NULL |
int main | ( | int | argc, |
char * | argv[] | ||
) |
main function