Case Vanhorsen and I have been exchanging private emails on the issues caused by the long type on Winndows being 32-bits even on x64 systems. It turns out that this is related to future GMP compatibility.
Once MPIR 1.3 is released, I think we need to decide on a strategy for future GMP compatibility and for handling the conversion of signed and unsigned integers of various lengths to and from mpz types. GMP 5 introduces a new mp_bitcnt_t that is used where bit counts are needed. It notes that this type is now typed as unsigned long but that it could be unsigned long long. By introducing this type and setting it as a an appropriate basic type that is 32-bits on 32-bit systems and 64-bits on 64-bit systems, we can, once the code works, _partially_ solve the Windows ABI issue as well as moving towards GMP compatibility. The other issue on GMP/MPIR compatibility is that some of the new function namings are different. We can either simply change our names to the GMP ones or have a set of compatibility defines added in GMP compatibility mode. Last but not least we have the issue of whether to do anything about all the functions that move things between signed and unsigned ints and mpz types. Ideally we would have two types defined as 'MPIR signed and unsigned integers' at top level and all the 'ui' and 'si' functions would use these inetegrs and would work whatever their lengths are in relation to the length of the mp_limb_t type. But this would involve quite a bit of work. In my view GMP compatibility is important so I would like to see, (1) MPIR add the mp_bitcnt_t, and (2) get this to work when it is both a 32 and a 64 bit type. Personally I would also like to see new GMP and MPIR functions named in the same way but this would depend ona level of co-oparation between the GMP and MPIR communities that seems unlikely to occur. But I think we need to address this. This would then leave us with the issue of functions that involve mpz types and signed/unsigned integers. This is a lot harder as it may involve quite a bit of work. I would like to hear other people's views on these issues. Brian -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en.
