From a40064009cd3865bce6315d9f87323340e3f343c Mon Sep 17 00:00:00 2001 From: Xubo Wang Date: Wed, 28 Feb 2024 14:39:18 -0500 Subject: [PATCH] fix binomial function in fci_string --- pyscf/lib/mcscf/fci_string.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pyscf/lib/mcscf/fci_string.c b/pyscf/lib/mcscf/fci_string.c index adae90da46..5ef53b5161 100644 --- a/pyscf/lib/mcscf/fci_string.c +++ b/pyscf/lib/mcscf/fci_string.c @@ -130,12 +130,7 @@ static int binomial(int n, int m) if (m*2 <= n) { m = n - m; } - uint64_t i; - uint64_t val = 1; - for (i = m; i <= n; i++) { - val *= i; - val /= i - m; - } + int val = binomial(n-1,m-1) + binomial(n-1,m); return val; } }