mini-gmp mpz_{get,set}_d not fully compatible with GMP

Torbjörn Granlund tg at gmplib.org
Fri Mar 9 16:29:41 UTC 2018


nisse at lysator.liu.se (Niels Möller) writes:

  For mini-gmp, it's highly desirable for the get_d function to be fully
  compatible with gmp at least for the common case of standard IEEE
  floats. I'm fine with documenting different behavior for obscure
  floating point variants.

I agree, albeit not strongly.  :-)

  For GMP, it's desirable to fix also the non IEEE-version.

That would have some value, I suppose, although non-IEEE formats of
course have become largely obsolete.  We could test any new code on vax
under the simh emulator, and perhaps on a s390 system/emulator.

One should also test on IEEE systems by disabling the punning code.
And then manipulate the rounding mode!

  If I recall earlier discussion correctly, we really need to know the
  size of the mantissa, from the compiler or a configure check (and the
  latter is not applicable to mini-gmp).

Or even a run-time check.  It should not take too long, a binary search
for the first steps might make sense.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list