From 6df3f7bf384deb72df9d02bd7a9757d552c1bfe2 Mon Sep 17 00:00:00 2001 From: mischief Date: Sun, 4 Nov 2018 11:37:02 -0800 Subject: [PATCH] libmp: declare mpfactorial --- sys/include/mp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/include/mp.h b/sys/include/mp.h index b49cb16a7..0de6db39c 100644 --- a/sys/include/mp.h +++ b/sys/include/mp.h @@ -102,6 +102,9 @@ int mpcmp(mpint *b1, mpint *b2); /* 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);