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:
parent
072e6de2ed
commit
c78b590e56
1 changed files with 1 additions and 1 deletions
|
@ -1387,7 +1387,7 @@ SCM_DEFINE (scm_logcount, "logcount", 1, 0, 0,
|
||||||
{
|
{
|
||||||
mpz_t z_n;
|
mpz_t z_n;
|
||||||
mpz_init (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);
|
scm_remember_upto_here_1 (n);
|
||||||
count = mpz_popcount (z_n);
|
count = mpz_popcount (z_n);
|
||||||
mpz_clear (z_n);
|
mpz_clear (z_n);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue