possible bug in libgmp-4.3.2

Torbjorn Granlund tg at gmplib.org
Mon Aug 23 22:06:39 CEST 2010


Evan Teran <eteran at alum.rit.edu> writes:

  Certain integer values yield incorrect results after "right shift"
  operations. For example the following program:

          mpz_tdiv_q_2exp(result, mpz, 32);
  
  outputs:
  $ ./test
  -49999
  -50000
  
That seems to be the correct output.

I think you might want to reread the documentation for mpz_tdiv_q_2exp.

-- 
Torbjörn


More information about the gmp-bugs mailing list