Bug in mpz_out_str...

Torbjorn Granlund tg at gmplib.org
Thu Dec 16 09:09:11 CET 2010


Vincent Lefevre <vincent at vinc17.org> writes:

  > Undefined bases:
  > 
  >   (1) -oo ... -37
  >   (2) -1
  >   (3) +1
  >   (4) +63 ... +oo
  > 
  > Of these, we only recognise case 4.  What is right to do?  GMP doesn't
  > do a whole lot of checks of consistency of arguments, and I am not sure
  > we should change that.
  > 
  > Opinions?
  
  I think the safest solution is to avoid undefined behavior when this
  doesn't introduce a performance penalty.

Thanks, I did something along those lines.

-- 
Torbjörn


More information about the gmp-bugs mailing list