Created
November 7, 2018 08:14
-
-
Save clojj/619ed0a9c2813dc0ae9b078e0e3347bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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