Skip to content

Instantly share code, notes, and snippets.

Created Nov 7, 2018
What would you like to do?
/* A table of factorials. table[i] is the factorial of i. The
* max field is calculated so that its factorial would not be an
* integer overflow.
typedef struct {
unsigned max;
unsigned *table;
} factorial_table;
int factorial_table_init(factorial_table *t);
int factorial_get(factorial_table *t, int n);
void factorial_table_free(factorial_table *t);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment