wbhart / mpir

Multiple Precision Integers and Rationals
GNU General Public License v3.0
229 stars 135 forks source link

GMP 5 #249

Closed ghost closed 6 years ago

ghost commented 6 years ago

I couldn't find an issue for this, but are there any plans for GMP 5 compatibility (probably not)? What is the resource estimate for this?

wbhart commented 6 years ago

I'm not sure what you mean. MPIR 0.9.0 was GMP 4 compatible, I believe.

ghost commented 6 years ago

Sorry, wrong version.

wbhart commented 6 years ago

GMP 5 is ancient. I still don't understand what you are asking. We update the GMP version number whenever we support all the features of that version. I think we are up to about 6 or close to it.

ghost commented 6 years ago

Sorry, wbhart/flint2#439 implies that the latest mpfr cannot be used with mpir. Do I understand this correctly?

wbhart commented 6 years ago

MPIR 3.0.0 was changed in a way that made it incompatible with Flint. And MPFR 4 is not compatible with MPIR 2.7.1. Neither of these has anything to do with GMP compatibility.

ghost commented 6 years ago

How can MPIR be compatible with GMP but not flint?

wbhart commented 6 years ago

MPIR is different to GMP on Windows 64. GMP uses 32 bit ui and si values, whereas MPIR uses 64 bit values. Unfortunately, one of the changes that was made along these lines in MPIR 2.7.1 meant that existing code written for GMP on Windows 64 wouldn't work with MPIR. This was fixed in MPIR 3.0.0, but Flint has never been updated to support the change. It's not completely trivial to fix, though it should be possible. We'll basically have to take the relevant function out of MPIR 2.7.2 and put it in Flint or rename it and include it in the next version of MPIR, since Flint really relies in a nontrivial way on the older incompatible version.

wbhart commented 6 years ago

Note that Flint includes a GMP compatibility layer, so that it can still work with GMP on Windows 64, even though it doesn't work in the same way as MPIR. It's slower, but at least it more or less works.