inf & nan for mpq

Torbjorn Granlund tg at gmplib.org
Wed Nov 17 07:56:14 CET 2010


Nic Schraudolph <nic at schraudolph.org> writes:

  The present (vanilla gmp-5.0.1) treatment of zero mpq denominators is
  highly inconsistent: in some places they raise a DIVIDE_BY_ZERO
  exception, but in others they're silently ignored (often resulting in
  incorrect behavior), and in many places they lead to memory access
  errors that produce obscure segfaults and bus errors.

If you have found any bugs in GMP, then please report them to the
gmp-bugs mailing list.  You make it sound like you have found *several*
bugs i mpq without reporting them!  I must admit that I am somewhat
unimpressed by that fact, and the context in which you mention this; it
may be interpreted as lobbying for your patch.

Your patch is not the solution to such bugs, and fixing bugs will take
priority over considering any feature patch.  If there are indeed bugs
in mpq, we will back-patch them in GMP 5.0 and GMP 4.3.

If we end up accepting your patch, it will be applied to a future
"feature release", such as 5.1 or whatever.

-- 
Torbjörn


More information about the gmp-discuss mailing list