1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00

(scm_logcount): Use mpz_com, not mpz_neg.

This commit is contained in:
Kevin Ryde 2003-05-05 23:01:30 +00:00
parent 072e6de2ed
commit c78b590e56

View file

@ -1387,7 +1387,7 @@ SCM_DEFINE (scm_logcount, "logcount", 1, 0, 0,
{
mpz_t z_n;
mpz_init (z_n);
mpz_neg (z_n, SCM_I_BIG_MPZ (n));
mpz_com (z_n, SCM_I_BIG_MPZ (n));
scm_remember_upto_here_1 (n);
count = mpz_popcount (z_n);
mpz_clear (z_n);