ref: 6df3f7bf384deb72df9d02bd7a9757d552c1bfe2
parent: 0a681f38eb2d5fb079b45b2cdb833fe8cb51a3cf
author: mischief <mischief@offblast.org>
date: Sun Nov 4 06:37:02 EST 2018
libmp: declare mpfactorial
--- a/sys/include/mp.h
+++ b/sys/include/mp.h
@@ -102,6 +102,9 @@
/* res = s != 0 ? b1 : b2 */
void mpsel(int s, mpint *b1, mpint *b2, mpint *res);
+/* return n! */
+mpint* mpfactorial(ulong n);
+
/* extended gcd return d, x, and y, s.t. d = gcd(a,b) and ax+by = d */
void mpextendedgcd(mpint *a, mpint *b, mpint *d, mpint *x, mpint *y);