Skip to content

Commit

Permalink
fix binomial function in fci_string
Browse files Browse the repository at this point in the history
  • Loading branch information
xubo-wang authored and sunqm committed Mar 1, 2024
1 parent e2cc8c1 commit a400640
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pyscf/lib/mcscf/fci_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit a400640

Please sign in to comment.