BUGS FIXED
* When reading a C++ number (like mpz_class) in an istream reaches the end
of the stream, the eofbit is now set.
* The result sign of mpz_rootrem's remainder is now always correct.
* The mpz_remove function now handles negative divisors.
* Contains all fixes from release 5.0.5.
SPEEDUPS
* The n-factorial and n-over-k functions have been reimplemented for great
speedups for small and large operands.
* New subquadratic algorithm for the Kronecker/Jacobi/Legendre symbol.
* Major speedup for ARM, in particular ARM Cortex-A9 and A15, thanks to broad
assembly support.
* Significant speedup or POWER6 and POWER7 thanks to improved assembly.
* The performance under M$ Windows' 64-bit ABI has been greatly improved
thanks to complete assembly support.
* Minor speed improvements of many functions and for many platforms.
FEATURES
* Many new CPUs recognised.
* New functions for multi-factorials, and primorial: mpz_2fac_ui,
mpz_mfac_uiui and mpz_primorial_ui.
* The mpz_powm_sec function now uses side-channel silent division for
converting into Montgomery residues.
* The fat binary mechanism is now more robust in its CPU recognition.
MISC
* Inclusion of assembly code is now controlled by the configure options
--enable-assembly and --disable-assembly. The "none" CPU targets is gone.
* In C++, the conversions mpq_class->mpz_class, mpf_class->mpz_class and
mpf_class->mpq_class are now explicit.
* Includes "mini-gmp", a small, portable, but less efficient, implementation
of a subset of GMP's mpn and mpz interfaces. Used in GMP bootstrap, but it
can also be bundled with applications as a fallback when the real GMP
library is unavailable.
* The ABIs under AIX are no longer called aix32 and aix64, but mode64 and 32.
This is more consistent with other powerpc systems.
* The coverage of the testsuite has been improved, using the lcov tool. See
also http://gmplib.org/devel/lcov/.
* It is now possible to compile GMP using a C++ compiler.
* K&R C compilers are no longer supported.
* The BSD MP compatibility functions have been removed.
Changes in GMP 5.0.1
BUGS FIXED
- Fat builds fixed.
- Fixed crash for huge multiplies when old FFT_TABLE2 type of parameter selection tables' sentinel was smaller than multiplied
operands.
- The solib numbers now reflect the removal of the documented but preliminary mpn_bdivmod function; we correctly flag
incompatibility with GMP 4.3. GMP 5.0.0 has this wrong, and should perhaps be uninstalled to avoid confusion.
SPEEDUPS
- Multiplication of large numbers has indirectly been sped up through better FFT tuning and processor recognition. Since many
operations depend on multiplication, there will be a general speedup.
FEATURES
- More Core i3, i5 an Core i7 processor models are recognised.
- Fixes and workarounds for Mac OS quirks should make this GMP version build using many of the different versions of "Xcode".
MISC
- The amount of scratch memory needed for multiplication of huge numbers have been reduced substantially (but is still larger
than in GMP 4.3.)
- Likewise, the amount of scratch memory needed for division of large numbers have been reduced substantially.
- The FFT tuning code of tune/tuneup.c has been completely rewritten, and new, large FFT parameter selection tables are provided
for many machines.
- Upgraded to the latest autoconf, automake, libtool.
Changes in GMP 5.0.0
BUGS FIXED
- None (contains the same fixes as release 4.3.2).
SPEEDUPS
- Multiplication has been overhauled:
1. Multiplication of larger same size operands has been improved with the addition of two new Toom functions and a new
internal function mpn_mulmod_bnm1 (computing U * V mod (B^n-1), B being the word base. This latter function is used for the
largest products, waiting for a better Schoenhage-Strassen U * V mod (B^n+1) implementation.
2. Likewise for squaring.
3. Multiplication of different size operands has been improved with the addition of many new Toom function, and by selecting
underlying functions better from the main multiply functions.
- Division and mod have been overhauled:
1. Plain "schoolbook" division is reimplemented using faster quotient approximation.
2. Division Q = N/D, R = N mod D where both the quotient and remainder are needed now runs in time O(M(log(N))). This is an
improvement of a factor log(log(N))
3. Division where just the quotient is needed is now O(M(log(Q))) on average.
4. Modulo operations using Montgomery REDC form now take time O(M(n)).
5. Exact division Q = N/D by means of mpz_divexact has been improved for all sizes, and now runs in time O(M(log(N))).
- The function mpz_powm is now faster for all sizes. Its complexity has gone from O(M(n)log(n)m) to O(M(n)m) where n is the size
of the modulo argument and m is the size of the exponent. It is also radically faster for even modulus, since it now partially
factors such modulus and performs two smaller modexp operations, then uses CRT.
- The internal support for multiplication yielding just the lower n limbs has been improved by using Mulders' algorithm.
- Computation of inverses, both plain 1/N and 1/N mod B^n have been improved by using well-tuned Newton iterations, and
wrap-around multiplication using mpn_mulmod_bnm1.
- A new algorithm makes mpz_perfect_power_p asymptotically faster.
- The function mpz_remove uses a much faster algorithm, is better tuned, and also benefits from the division improvements.
- Intel Atom and VIA Nano specific optimisations.
- Plus hundreds of smaller improvements and tweaks!
FEATURES
- New mpz function: mpz_powm_sec for side-channel quiet modexp computations.
- New mpn functions: mpn_sqr, mpn_and_n, mpn_ior_n, mpn_xor_n, mpn_nand_n, mpn_nior_n, mpn_xnor_n, mpn_andn_n, mpn_iorn_n,
mpn_com, mpn_neg, mpn_copyi, mpn_copyd, mpn_zero.
- The function mpn_tdiv_qr now allows certain argument overlap.
- Support for fat binaries for 64-bit x86 processors has been added.
- A new type, mp_bitcnt_t for bignum bit counts, has been introduced.
- Support for Windows64 through mingw64 has been added.
- The cofactors of mpz_gcdext and mpn_gcdext are now more strictly normalised, returning to how GMP 4.2 worked. (Note that also
release 4.3.2 has this change.)
MISC
- The mpn_mul function should no longer be used for squaring, instead use the new mpn_sqr.
- The algorithm selection has been improved, the number of thresholds have more than doubled, and the tuning and use of existing
thresholds have been improved.
- The tune/speed program can measure many of new functions.
- The mpn_bdivmod function has been removed. We do not consider this an incompatible change, since the function was marked as
preliminary.
- The testsuite has been enhanced in various ways.
Changes in GMP 4.3.2
Bugs:
- Fixed bug in mpf_eq.
- Fixed overflow issues in mpz_set_str, mpz_inp_str, mpf_set_str, and mpf_get_str.
- Avoid unbounded stack allocation for unbalanced multiplication.
- Fixed bug in FFT multiplication.
Speedups:
- None, except that improved processor recognition helps affected processors.
Features:
- Recognise more "Core 2" processor variants.
- The cofactors of mpz_gcdext and mpn_gcdext are now more strictly normalised, returning to how GMP 4.2 worked.
Changes between GMP version 4.2.2 and 4.2.3:
Bugs:
* Fix x86 CPU recognition code to properly identify recent AMD and Intel
64-bit processors.
* The >> operator of the C++ wrapper gmpxx.h now does floor rounding, not
truncation.
* Inline semantics now follow the C99 standard, and works with recent GCC
releases.
* C++ bitwise logical operations work for more types.
* For C++, gmp.h now includes cstdio, improving compiler compatibility.
* Bases > 36 now work properly in mpf_set_str.
Speedups:
* None, except that proper processor recognition helps affected processors.
Features:
* The allocation functions now detect overflow of the mpz_t type. This means
that overflow will now cause an abort, except when the allocation
computation itself overflows. (Such overflow can probably only happen in
powering functions; we will detect powering overflow in the future.)
Changes between GMP version 4.2 and 4.2.1
Bugs:
* Shared library numbers corrected.
* Broken support for 32-bit AIX fixed.
* Misc minor fixes.
Speedups:
* Exact division (mpz_divexact) now falls back to plain division for large
operands.
Features:
* Support for some new systems.
Changes between GMP version 4.1.4 and 4.2
Bugs:
* Minor bug fixes and code generalizations.
* Expanded and improved test suite.
Speedups:
* Many minor optimizations, too many to mention here.
* Division now always subquadratic.
* Computation of n-factorial much faster.
* Added basic x86-64 assembly code.
* Floating-point output is now subquadratic for all bases.
* FFT multiply code now about 25% faster.
* Toom3 multiply code faster.
Features:
* Much improved configure.
* Workarounds for many more compiler bugs.
* Temporary allocations are now made on the stack only if small.
* New systems supported: HPPA-2.0 gcc, IA-64 HP-UX, PowerPC-64 Darwin,
Sparc64 GNU/Linux.
* New i386 fat binaries, selecting optimised code at runtime (--enable-fat).
* New build option: --enable-profiling=instrument.
* New memory function: mp_get_memory_functions.
* New Mersenne Twister random numbers: gmp_randinit_mt, also now used for
gmp_randinit_default.
* New random functions: gmp_randinit_set, gmp_urandomb_ui, gmp_urandomm_ui.
* New integer functions: mpz_combit, mpz_rootrem.
* gmp_printf etc new type "M" for mp_limb_t.
* gmp_scanf and friends now accept C99 hex floats.
* Numeric input and output can now be in bases up to 62.
* Comparisons mpz_cmp_d, mpz_cmpabs_d, mpf_cmp_d recognise infinities.
* Conversions mpz_get_d, mpq_get_d, mpf_get_d truncate towards zero,
previously their behaviour was unspecified.
* Fixes for overflow issues with operands >= 2^31 bits.
Caveats:
* mpfr is gone, and will from now on be released only separately. Please see
www.mpfr.org.
* mpn/generic/rootrem.c: In Newton loop, pad qp with leading zero.
* mpn/generic/rootrem.c: Allocate 1.585 (log2(3)) times more space
for pp temporary to allow for worst case overestimate of root.
Add some asserts.
* tests/mpz/t-root.c: Generalize and speed up.
* mpfr/pow.c: Fixed bug (infinite loop) for exact powers.
* mpfr/sub.c: Fixed wrong inexact flag for a - b where a and b are of
different signs and EXP(a) < EXP(b).
* printf/printffuns.c (gmp_fprintf_reps): Make it actually work
for padding > 256.
* gmp-impl.h (USE_LEADING_REGPARM): Disable for PIC code generation.
* mpn/generic/tdiv_qr.c: Remove a bogus assert.
* mpn/generic/mode1o.c, mpn/alpha/ev5/mode1o.c: Correction to ASSERTs.
Reported by Christoph Ludwig.
* mpf/urandomb.c: Truncate nbits to precision of rop.
* configure.in (sparc v9 *bsd*): Add NetBSD and OpenBSD sparc64.
(x86 openbsd*): Extra underscore for _GLOBAL_OFFSET_TABLE_.
* mpn/generic/rootrem.c: Avoid overflow in xnb calculation.
* mpz/root.c: Avoid overflow in rootnb calculation.
* gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal): Fix broken
mpq/double functions.
* mpn/m68k/lshift.asm: Fix typo in !scale_available_p code.
* mpn/m68k/rshift.asm: Likewise.
* mpz/remove.c: Make src==0 return 0, not do DIVIDE_BY_ZERO.
* mpfr/acinclude.m4 (MPFR_CONFIGS): Patch by Vincent for an apparent
float rounding gremlin on powerpc.
* mpf/inp_str.c: Fix returned count of chars read, reported by Paul
Zimmermann. Also fix a memory leak for invalid input.
* mpfr/set_q.c: Allow for 1 bit numerator or denominator.
* Bug fixes.
* Speed improvements.
* Upwardly binary compatible with 4.0, 4.0.1, and 3.x versions.
* Asymptotically fast conversion to/from strings (mpz, mpq, mpn levels), but
also major speed improvements for tiny operands.
* mpn_get_str parameter restrictions relaxed.
* Major speed improvments for HPPA 2.0 systems.
* Major speed improvments for UltraSPARC systems.
* Major speed improvments for IA-64 systems (but still sub-optimal code).
* Extended test suite.
* mpfr is back, with many bug fixes and portability improvements.
* New function: mpz_ui_sub.
* New functions: mpz_export, mpz_import.
* Optimization for nth root functions (mpz_root, mpz_perfect_power_p).
* Optimization for extended gcd (mpz_gcdext, mpz_invert, mpn_gcdext).
* Generalized low-level number format, reserving a `nails' part of each
limb. (Please note that this is really experimental; some functions
are likely to compute garbage when nails are enabled.)
* Nails-enabled Alpha 21264 assembly code, allowing up to 75% better
performance. (Use --enable-nails=4 to enable it.)
* Bug fixes.
* Speed improvements.
* Upwardly binary compatible with 3.x versions.
* New CPU support: IA-64, Pentium 4.
* Improved CPU support: 21264, Cray vector systems.
* Support for all MIPS ABIs: o32, n32, 64.
* New systems supported: Darwin, SCO, Windows DLLs.
* New divide-and-conquer square root algorithm.
* New algorithms chapter in the manual.
* New malloc reentrant temporary memory method.
* New C++ class interface by Gerardo Ballabio (beta).
* Revamped configure, featuring ABI selection.
* Speed improvements for mpz_powm and mpz_powm_ui (mainly affecting small
operands).
* mpz_perfect_power_p now properly recognizes 0, 1, and negative perfect
powers.
* mpz_hamdist now supports negative operands.
* mpz_jacobi now accepts non-positive denominators.
* mpz_powm now supports negative exponents.
* mpn_mul_1 operand overlap requirements relaxed.
* Float input and output uses locale specific decimal point where available.
* New gmp_printf, gmp_scanf and related functions.
* New division functions: mpz_cdiv_q_2exp, mpz_cdiv_r_2exp, mpz_divexact_ui.
* New divisibility tests: mpz_divisible_p, mpz_divisible_ui_p,
mpz_divisible_2exp_p, mpz_congruent_p, mpz_congruent_ui_p,
mpz_congruent_2exp_p.
* New Fibonacci function: mpz_fib2_ui.
* New Lucas number functions: mpz_lucnum_ui, mpz_lucnum2_ui.
* Other new integer functions: mpz_cmp_d, mpz_cmpabs_d, mpz_get_d_2exp,
mpz_init2, mpz_kronecker, mpz_lcm_ui, mpz_realloc2.
* New rational I/O: mpq_get_str, mpq_inp_str, mpq_out_str, mpq_set_str.
* Other new rational functions: mpq_abs, mpq_cmp_si, mpq_div_2exp,
mpq_mul_2exp, mpq_set_f.
* New float tests: mpf_integer_p, mpf_fits_sint_p, mpf_fits_slong_p,
mpf_fits_sshort_p, mpf_fits_uint_p, mpf_fits_ulong_p, mpf_fits_ushort_p.
* Other new float functions: mpf_cmp_d, mpf_get_default_prec, mpf_get_si,
mpf_get_ui, mpf_get_d_2exp.
* New random functions: gmp_randinit_default, gmp_randinit_lc_2exp_size.
* New demo expression string parser (see demos/expr).
* New preliminary perl interface (see demos/perl).
* Tuned algorithm thresholds for many more CPUs.