GMP suggestions

Marc Glisse marc.glisse at inria.fr
Thu May 20 15:22:59 CEST 2010


There are similar discussions in the archives, for example:
http://gmplib.org/list-archives/gmp-discuss/2005-October/001916.html

Basically, TG thinks the overhead of having an infinity (and the effort to 
add one) is too large. I guess you could try to convince him if you wrote 
a prototype implementation and ran some benchmarks. Note that if you have 
infinity, you also need NaN for the result of Inf-Inf or 0*Inf.

What kind of information would you want from numeric_limits? It could tell 
you that radix=2, is_signed, is_integer for mpz but not the others, 
is_exact for mpz and mpq but not mpf, !has_infinity, !is_bounded, 
!is_modulo and not much more. Things like digits don't fit in an int (or 
if you want to make them fit, it is radix that won't fit anymore).

-- 
Marc Glisse


More information about the gmp-discuss mailing list