1Copyright 1996, 1999-2016, 2018-2020 Free Software Foundation, Inc. 2 3Verbatim copying and distribution of this entire article is permitted in any 4medium, provided this notice is preserved. 5 6Changes between GMP version 6.2.0 and 6.2.1 7 8 BUGS FIXED 9 * A possible overflow of type int is avoided for mpz_cmp on huge operands. 10 11 * Overflows are more carefully detected and reported for mpz_pow_ui. 12 13 * A bug in longlong.h for aarch64 sub_ddmmss, not affecting GMP, was healed. 14 15 * mini-gmp: mpz_out_str and mpq_out_str now correctly handle out of 16 range bases. 17 18 FEATURES 19 * C90 compliance. 20 21 * Initial support for Darwin on arm64, and improved portability. 22 23 * Support for more processors. 24 25 SPEEDUPS 26 * None, except indirectly through recognition of new CPUs. 27 28 MISC 29 * None. 30 31Changes between GMP version 6.1.* and 6.2.0 32 33 BUGS FIXED 34 * gmp_snprintf now correctly reports an error (returns -1) when snprintf 35 does. 36 37 * Conversion to double is now more robust even if the configuration process 38 does not recognize the float format. 39 40 * mpz_powm could return a not completely normalised value, when the 41 exponent was 1 and the base < 0. 42 43 * mpf_set_str could create invalid mpf_t variables for input strings with 44 many leading zeros. 45 46 FEATURES 47 * New C++ functions factorial, primorial and fibonacci for mpz_class. 48 49 * Functions to detect primality now substitute the first 24 Miller-Rabin 50 iterations with the BPSW test. 51 52 * Mini-GMP: new functions mpz_2fac_ui and mpz_mfac_uiui. 53 54 * Mini-GMP: mpz_sizeinbase, mpz_get_str, and mpz_set_str now support bases up 55 to 62. 56 57 * Mini-GMP: added support for the mpq_t layer. 58 59 * MIPS r6 cores are now supported. 60 61 SPEEDUPS 62 * Major speedup for AMD Ryzen and Epyc thanks to an extensive set of assembly 63 code. 64 65 * Major speedup for IBM POWER9 thanks to assembly code making use of new madd 66 instruction. 67 68 * Speedup for 64-bit ARM CPUs thanks to new/improved assembly code. 69 70 * The n-over-k function mpz_bin_ui has been reimplemented for great speedups 71 for large operands. 72 73 * Speedup for the worst case of mpz_perfect_power_p. 74 75 * Speedup for gcd for small and medium size operands. 76 77 * Speedup for really huge multiplies thanks to much larger FFT tables. 78 79 MISC 80 * Internal representation of the mpz_t variables now supports lazy 81 allocation; memory is allocated only when a value is stored. 82 83 * Small improvements and better coverage for the test suite. 84 85 * The tune/speed program can measure some more functions. 86 87 * The low-level function mpn_mul no longer diverts to mpn_sqr, users should 88 call mpn_sqr directly when applicable. 89 90 * New installed files gmp.pc and gmpxx.pc, for use with pkg-config. 91 Contributed by Hugh McMaster. 92 93Changes between GMP version 6.1.1 and 6.1.2 94 95 BUGS FIXED 96 * Mini-GMP: Fixed a division bug, which on a machine with 64-bit 97 unsigned long affects approximately 1 out of 2^32 divisors. 98 99 * Mini-GMP: Fix mpz_set_str crash on inputs with a large number of 100 leading zeros. Also stricter input validation, rejecting inputs 101 with no digits. 102 103 FEATURES 104 * Handle more systems which require PIC code in static libraries (e.g., 105 "hardened" Gentoo and Debian 9). 106 107 * Configuration for arm (-32 and -64) has been rewritten, fixing poor 108 code selection for many CPUs. 109 110 * Mini-GMP: Updated to the latest development version, including 111 new functions mpn_com and mpn_neg. 112 113 SPEEDUPS 114 * None, except for arm CPUs affected by the configuration rewrite. 115 116 MISC 117 - 118 119Changes between GMP version 6.1.0 and 6.1.1 120 121 BUGS FIXED 122 * Make Intel Broadwell configurations work on Windows. 123 124 FEATURES 125 * Work around faulty cpuid on some recent Intel chips (this allows GMP to run 126 on Skylake Pentiums). 127 128 * Support thumb-less ARM chips. 129 130Changes between GMP version 6.0.* and 6.1.0 131 132 BUGS FIXED 133 * The public function mpn_com is now correctly declared in gmp.h. 134 135 * Healed possible failures of mpn_sec_sqr for non-cryptographic sizes for 136 some obsolete CPUs. 137 138 * The option --disable-assembly now disables all inlined asm. 139 140 * Fixed bug affecting mini-gmp's bitwise functions mpz_setbit, mpz_clrbit, 141 and mpz_combit. 142 143 * Various problems related to precision for mpf have been fixed. 144 145 * Fixed ABI incompatible stack alignment in calls from assembly code. 146 147 * Fixed PIC bug in popcount affecting Intel processors using the 32-bit ABI. 148 149 SPEEDUPS 150 * Speedup for Intel Broadwell and Skylake through assembly code making use of 151 new ADX instructions. 152 153 * Square root is now faster when the remainder is not needed. Also the speed 154 to compute the k-th root improved, for small sizes. 155 156 * Improved arm64 support. 157 158 FEATURES 159 * New C++ functions gcd and lcm for mpz_class. 160 161 * New public mpn functions mpn_divexact_1, mpn_zero_p, and mpn_cnd_swap. 162 163 * New public mpq_cmp_z function, to efficiently compare rationals with 164 integers. 165 166 * Support for Darwin in all x86 code, thereby enabling fat builds on Darwin. 167 168 * Support for more 32-bit arm processors. 169 170 * Support for compilation with clang/llvm on more platforms. Caution: GMP 171 triggers mis-compilation bugs in clang for many platforms, such as arm, x86 172 (32-bit and 64-bit), powerpc, mips. 173 174 * Support for AVX-less modern x86 CPUs. (Such support might be missing either 175 because the CPU vendor chose to disable AVX, or because the running kernel 176 lacks AVX context switch support.) 177 178 * Stack usage trimmed; we believe 512 KiB is now sufficient for any GMP 179 call, irrespective of operand size. 180 181 * Support for NetBSD under Xen; we switch off AVX unconditionally under 182 NetBSD since a bug in NetBSD makes AVX fail under Xen. 183 184 MISC 185 * We now use manufacturers' code names for x86 CPUs, e.g., "haswell" instead 186 of names derived from the commercial brands. 187 188 * Small improvements and better coverage for the test suite. 189 190 * The various FreeBSD problems listed for 6.0.0 affect this release too. 191 192 * Tuned values for FFT multiplications are provided for larger number on 193 many platforms. 194 195Changes between GMP version 5.1.* and 6.0.0 196 197 BUGS FIXED 198 * The function mpz_invert now considers any number invertible in Z/1Z. 199 200 * The mpn multiply code now handles operands of more than 2^31 limbs 201 correctly. (Note however that the mpz code is limited to 2^32 bits on 202 32-bit hosts and 2^37 bits on 64-bit hosts.) 203 204 * Contains all fixes from release 5.1.3. 205 206 SPEEDUPS 207 * Plain division of large operands is faster and more monotonous in operand 208 size. 209 210 * Major speedup for ARM, in particular ARM Cortex-A15, thanks to improved 211 assembly. 212 213 * Major speedup for SPARC T4/T5 and speedup also for T3, thanks to a lot of 214 new assembly. 215 216 * Speedup for Intel Sandy Bridge, Ivy Bridge, Haswell, thanks to rewritten 217 and vastly expanded assembly support. Speedup also for the older Core 2 218 and Nehalem. 219 220 * Faster mixed arithmetic between mpq_class and double. 221 222 * With g++, optimise more operations when one argument is a simple constant. 223 224 FEATURES 225 * Support for new Intel and AMD CPUs. 226 227 * Support for ARM64 alias Aarch64 alias ARMv8. 228 229 * New public functions mpn_sec_mul and mpn_sec_sqr, implementing side-channel 230 silent multiplication and squaring. 231 232 * New public functions mpn_sec_div_qr and mpn_sec_div_r, implementing 233 side-channel silent division. 234 235 * New public functions mpn_cnd_add_n and mpn_cnd_sub_n. Side-channel silent 236 conditional addition and subtraction. 237 238 * New public function mpn_sec_powm, implementing side-channel silent modexp. 239 240 * New public function mpn_sec_invert, implementing side-channel silent 241 modular inversion. 242 243 * Better support for applications which use the mpz_t type, but nevertheless 244 need to call some of the lower-level mpn functions. See the documentation 245 for mpz_limbs_read and related functions. 246 247 MISC 248 * This release will not work on NetBSD 5.x, FreeBSD 7.x, 8.x or 9 series 249 before 9.3. The reason is that the m4 command is not correctly 250 implemented. (Workaround: Use an older GMP release, or install GNU m4 from 251 /usr/ports and tell GMP to use it.) 252 253 * This release will not build properly on FreeBSD/amd64 before version 10 254 using the 32-bit ABI (once a working m4 is installed). The reason is 255 broken limits.h. (Workaround: Use an older GMP release if using the 32-bit 256 ABI on these FreeBSD releases is important.) 257 258 * This release will not work reliably on FreeBSD 10.0 for i386 or amd64 using 259 the 32-bit ABI. The reason is bugs in the compiler 'clang'. Depending on 260 CPU-dependent compiler flags, GMP may or may not be miscompiled in a 261 particular build. (Workaround: Compiling gcc from /usr/ports should work, 262 except that gcc circularly depends on GMP; we have not been able to test 263 that workaround due to FreeBSD 10.0 bugs affecting its ability to run under 264 KVM and Xen.) 265 266 * This release will not compile on FreeBSD before version 10 for i386, 267 targeting any modern AMD processor. The reason is bugs in the old gcc 268 bundled with FreeBSD. (Workaround: install a less obsolete gcc from 269 /usr/ports and tell GMP to use it, or override the -march=amdfam10 270 GMP configure command line argument.) 271 272 273Changes between GMP version 5.1.2 and 5.1.3 274 275 BUGS FIXED 276 * The internal functions mpn_sbpi1_div_qr_sec mpn_sbpi1_div_r_sec could 277 compute garbage with a low probability. They are now rewritten, and the 278 test code has been improved. 279 280 * A bug in the ia64 implementation of mpn_divrem_2, clobbering some 281 callee-save registers, has been fixed. This is an internal 282 function, with the bug manifesting itself as miscomputation in, 283 e.g., mpn_sqrtrem. 284 285 * The documentation now correctly says 'const' for input arguments. 286 287 SPEEDUPS 288 * None. 289 290 FEATURES 291 * None. 292 293 MISC 294 * None. 295 296 297Changes between GMP version 5.1.1 and 5.1.2 298 299 BUGS FIXED 300 * A bug in mpz_powm_ui triggered by base arguments of at least 15000 decimal 301 digits or mod arguments of at least 7500 decimal digits has been fixed. 302 303 * An AMD Bulldozer specific bug affecting the 64-bit Windows ABI has been 304 fixed. This bug was in a key function (mpn_mul_1) and made both Bulldozer 305 specific builds and fat builds run on Bulldozer completely non-functional. 306 307 SPEEDUPS 308 * None. 309 310 FEATURES 311 * None. 312 313 MISC 314 * Fixes and generalisations to the test suite. 315 316 * Minor portability enhancements. 317 318 319Changes between GMP version 5.1.0 and 5.1.1 320 321 BUGS FIXED 322 * On Windows 64-bit, an error causing link errors about 323 __gmp_binvert_limb_table has been fixed. 324 325 * Aarch64 alias ARM64 support now works. 326 327 * A possible buffer overrun in mpz_ior has been fixed. 328 329 * A rare sign flip in mpz_remove has been fixed. 330 331 * A bug causing problems with mpf numbers with absolute value >= 2^31 has 332 been fixed. 333 334 * Several bugs in mini-gmp have been fixed. 335 336 * A bug caused by automake, related to the 'distcheck' target, has been fixed 337 by upgrading the automake used for GMP release engineering. 338 339 SPEEDUPS 340 * None. 341 342 FEATURES 343 * Preliminary support for the x32 ABI under x86-64. 344 345 MISC 346 * The mini-gmp testsuite now tests the entire set of functions. 347 348 * Various improvements of the GMP testsuite. 349 350 351Changes between GMP version 5.0.* and 5.1.0 352 353 BUGS FIXED 354 * When reading a C++ number (like mpz_class) in an istream reaches the end 355 of the stream, the eofbit is now set. 356 357 * The result sign of mpz_rootrem's remainder is now always correct. 358 359 * The mpz_remove function now handles negative divisors. 360 361 * Contains all fixes from release 5.0.5. 362 363 SPEEDUPS 364 * The n-factorial and n-over-k functions have been reimplemented for great 365 speedups for small and large operands. 366 367 * New subquadratic algorithm for the Kronecker/Jacobi/Legendre symbol. 368 369 * Major speedup for ARM, in particular ARM Cortex-A9 and A15, thanks to broad 370 assembly support. 371 372 * Significant speedup for POWER6 and POWER7 thanks to improved assembly. 373 374 * The performance under M$ Windows' 64-bit ABI has been greatly improved 375 thanks to complete assembly support. 376 377 * Minor speed improvements of many functions and for many platforms. 378 379 FEATURES 380 * Many new CPUs recognised. 381 382 * New functions for multi-factorials, and primorial: mpz_2fac_ui, 383 mpz_mfac_uiui and mpz_primorial_ui. 384 385 * The mpz_powm_sec function now uses side-channel silent division for 386 converting into Montgomery residues. 387 388 * The fat binary mechanism is now more robust in its CPU recognition. 389 390 MISC 391 * Inclusion of assembly code is now controlled by the configure options 392 --enable-assembly and --disable-assembly. The "none" CPU target is gone. 393 394 * In C++, the conversions mpq_class->mpz_class, mpf_class->mpz_class and 395 mpf_class->mpq_class are now explicit. 396 397 * Includes "mini-gmp", a small, portable, but less efficient, implementation 398 of a subset of GMP's mpn and mpz interfaces. Used in GMP bootstrap, but it 399 can also be bundled with applications as a fallback when the real GMP 400 library is unavailable. 401 402 * The ABIs under AIX are no longer called aix32 and aix64, but mode64 and 32. 403 This is more consistent with other powerpc systems. 404 405 * The coverage of the testsuite has been improved, using the lcov tool. See 406 also https://gmplib.org/devel/lcov/. 407 408 * It is now possible to compile GMP using a C++ compiler. 409 410 * K&R C compilers are no longer supported. 411 412 * The BSD MP compatibility functions have been removed. 413 414 415Changes between GMP version 5.0.4 and 5.0.5 416 417 BUGS FIXED 418 * A bug causing AMD 11h processors to be treated like AMD 10h has been fixed. 419 The 11h processors do not correctly handle all 10h (aka K10) instructions, 420 and GMP's use of these instructions results in major miscomputations (not 421 as one would have hoped CPU traps of some 'illegal instruction' sort). 422 423 * A bug affecting recent Intel Sandy Bridge CPUs resulting in configuration 424 failures has been fixed. 425 426 SPEEDUPS 427 * None. 428 429 FEATURES 430 * A couple of tests added to the self-check suite. 431 432 MISC 433 * None. 434 435 436Changes between GMP version 5.0.3 and 5.0.4 437 438 BUGS FIXED 439 * Thresholds in mpn_powm_sec for both fat and non-fat builds are now used 440 safely, plugging a one-word buffer overrun introduced in the 5.0.3 release 441 (for non-fat) and a multi-word buffer overrun that existed since 5.0 (for 442 fat). (We have not been able to provoke malign stack smashing in any of 443 the ~100 configurations explored by the GMP nightly builds, but the bug 444 should be assumed to be exploitable.) 445 446 * Two bugs in multiplication code causing incorrect computation with 447 extremely low probability have been fixed. 448 449 * A bug in the test suite causing buffer overruns during "make check", 450 sometimes leading to subsequent malloc crashes, has been fixed. 451 452 * Two bugs in the gcd code have been fixed. They could lead to incorrect 453 results, but for uniformly distributed random operands, the likelihood for 454 that is infinitesimally small. (There was also a third bug, but that was 455 an incorrect ASSERT, which furthermore was not enabled by default.) 456 457 * A bug affecting 32-bit PowerPC division has been fixed. The bug caused 458 miscomputation for certain divisors in the range 2^32 ... 2^64-1 (about 1 459 in 2^30 of these). 460 461 SPEEDUPS 462 * None, except indirectly through recognition of new CPUs, and through better 463 tuning parameters. 464 465 FEATURES 466 * Some more tests added to the self-check suite. 467 468 * The AMD "Bulldozer" CPU is now recognised. 469 470 MISC 471 * None. 472 473 474Changes between GMP version 5.0.2 and 5.0.3 475 476 BUGS FIXED 477 * A few minor bugs related to portability fixed. 478 479 * A slight timing leak of the powm_sec functions have been sealed. (This 480 leak could possibly be used to extract the most significant few bits of the 481 exponent. "Few" here means at most 10.) 482 483 * The mpz_nextprime function now runs a safer number of pseudo-random prime 484 tests. 485 486 * A bug in division code possibly causing incorrect computation was fixed. 487 488 SPEEDUPS 489 * None, except indirectly through recognition of new CPUs, and through better 490 tuning parameters. 491 492 FEATURES 493 * New CPUs recognised. 494 495 * IBM S/390 are now supported in both 31/32-bit and 64-bit mode. (We have 496 not been able to fully test this on any multilib machine, since IBM expired 497 our guest account a few days before our release.) 498 499 MISC 500 * None. 501 502 503Changes between GMP version 5.0.1 and 5.0.2 504 505 BUGS FIXED 506 * Many minor bugs related to portability fixed. 507 508 * The support for HPPA 2.0N now works, after an assembly bug fix. 509 510 * A test case type error has been fixed. The symptom of this bug was 511 spurious 'make check' failures. 512 513 SPEEDUPS 514 * None, except indirectly through recognition of new CPUs. 515 516 FEATURES 517 * Fat builds are now supported for 64-bit x86 processors also under Darwin. 518 519 MISC 520 * None. 521 522 523Changes between GMP version 5.0.0 and 5.0.1 524 525 BUGS FIXED 526 * Fat builds fixed. 527 528 * Fixed crash for huge multiplies when old FFT_TABLE2 type of parameter 529 selection tables' sentinel was smaller than multiplied operands. 530 531 * The solib numbers now reflect the removal of the documented but preliminary 532 mpn_bdivmod function; we correctly flag incompatibility with GMP 4.3. GMP 533 5.0.0 has this wrong, and should perhaps be uninstalled to avoid confusion. 534 535 SPEEDUPS 536 * Multiplication of large numbers has indirectly been sped up through better 537 FFT tuning and processor recognition. Since many operations depend on 538 multiplication, there will be a general speedup. 539 540 FEATURES 541 * More Core i3, i5 an Core i7 processor models are recognised. 542 543 * Fixes and workarounds for Mac OS quirks should make this GMP version build 544 using many of the different versions of "Xcode". 545 546 MISC 547 * The amount of scratch memory needed for multiplication of huge numbers has 548 been reduced substantially (but is still larger than in GMP 4.3.) 549 550 * Likewise, the amount of scratch memory needed for division of large numbers 551 has been reduced substantially. 552 553 * The FFT tuning code of tune/tuneup.c has been completely rewritten, and 554 new, large FFT parameter selection tables are provided for many machines. 555 556 * Upgraded to the latest autoconf, automake, libtool. 557 558 559Changes between GMP version 4.3.X and 5.0.0 560 561 BUGS FIXED 562 * None (contains the same fixes as release 4.3.2). 563 564 SPEEDUPS 565 * Multiplication has been overhauled: 566 (1) Multiplication of larger same size operands has been improved with 567 the addition of two new Toom functions and a new internal function 568 mpn_mulmod_bnm1 (computing U * V mod (B^n-1), B being the word base. 569 This latter function is used for the largest products, waiting for a 570 better Schoenhage-Strassen U * V mod (B^n+1) implementation. 571 (2) Likewise for squaring. 572 (3) Multiplication of different size operands has been improved with the 573 addition of many new Toom function, and by selecting underlying 574 functions better from the main multiply functions. 575 576 * Division and mod have been overhauled: 577 (1) Plain "schoolbook" division is reimplemented using faster quotient 578 approximation. 579 (2) Division Q = N/D, R = N mod D where both the quotient and remainder 580 are needed now runs in time O(M(log(N))). This is an improvement of 581 a factor log(log(N)) 582 (3) Division where just the quotient is needed is now O(M(log(Q))) on 583 average. 584 (4) Modulo operations using Montgomery REDC form now take time O(M(n)). 585 (5) Exact division Q = N/D by means of mpz_divexact has been improved 586 for all sizes, and now runs in time O(M(log(N))). 587 588 * The function mpz_powm is now faster for all sizes. Its complexity has 589 gone from O(M(n)log(n)m) to O(M(n)m) where n is the size of the modulo 590 argument and m is the size of the exponent. It is also radically 591 faster for even modulus, since it now partially factors such modulus 592 and performs two smaller modexp operations, then uses CRT. 593 594 * The internal support for multiplication yielding just the lower n limbs 595 has been improved by using Mulders' algorithm. 596 597 * Computation of inverses, both plain 1/N and 1/N mod B^n have been 598 improved by using well-tuned Newton iterations, and wrap-around 599 multiplication using mpn_mulmod_bnm1. 600 601 * A new algorithm makes mpz_perfect_power_p asymptotically faster. 602 603 * The function mpz_remove uses a much faster algorithm, is better tuned, 604 and also benefits from the division improvements. 605 606 * Intel Atom and VIA Nano specific optimisations. 607 608 * Plus hundreds of smaller improvements and tweaks! 609 610 FEATURES 611 * New mpz function: mpz_powm_sec for side-channel quiet modexp 612 computations. 613 614 * New mpn functions: mpn_sqr, mpn_and_n, mpn_ior_n, mpn_xor_n, mpn_nand_n, 615 mpn_nior_n, mpn_xnor_n, mpn_andn_n, mpn_iorn_n, mpn_com, mpn_neg, 616 mpn_copyi, mpn_copyd, mpn_zero. 617 618 * The function mpn_tdiv_qr now allows certain argument overlap. 619 620 * Support for fat binaries for 64-bit x86 processors has been added. 621 622 * A new type, mp_bitcnt_t for bignum bit counts, has been introduced. 623 624 * Support for Windows64 through mingw64 has been added. 625 626 * The cofactors of mpz_gcdext and mpn_gcdext are now more strictly 627 normalised, returning to how GMP 4.2 worked. (Note that also release 628 4.3.2 has this change.) 629 630 MISC 631 * The mpn_mul function should no longer be used for squaring, 632 instead use the new mpn_sqr. 633 634 * The algorithm selection has been improved, the number of thresholds have 635 more than doubled, and the tuning and use of existing thresholds have 636 been improved. 637 638 * The tune/speed program can measure many of new functions. 639 640 * The mpn_bdivmod function has been removed. We do not consider this an 641 incompatible change, since the function was marked as preliminary. 642 643 * The testsuite has been enhanced in various ways. 644 645 646Changes between GMP version 4.3.1 and 4.3.2 647 648 Bugs: 649 * Fixed bug in mpf_eq. 650 * Fixed overflow issues in mpz_set_str, mpz_inp_str, mpf_set_str, and 651 mpf_get_str. 652 * Avoid unbounded stack allocation for unbalanced multiplication. 653 * Fixed bug in FFT multiplication. 654 655 Speedups: 656 * None, except that proper processor recognition helps affected processors. 657 658 Features: 659 * Recognise more "Core 2" processor variants. 660 * The cofactors of mpz_gcdext and mpn_gcdext are now more strictly 661 normalised, returning to how GMP 4.2 worked. 662 663 664Changes between GMP version 4.3.0 and 4.3.1 665 666 Bugs: 667 * Fixed bug in mpn_gcdext, affecting also mpz_gcdext and mpz_invert. 668 The bug could cause a cofactor to have a leading zero limb, which 669 could lead to crashes or miscomputation later on. 670 * Fixed some minor documentation issues. 671 672 Speedups: 673 * None. 674 675 Features: 676 * Workarounds for various issues with Mac OS X's build tools. 677 * Recognise more IBM "POWER" processor variants. 678 679 680Changes between GMP version 4.2.X and 4.3.0 681 682 Bugs: 683 * Fixed bug in mpz_perfect_power_p with recognition of negative perfect 684 powers that can be written both as an even and odd power. 685 * We might accidentally have added bugs since there is a large amount of 686 new code in this release. 687 688 Speedups: 689 * Vastly improved assembly code for x86-64 processors from AMD and Intel. 690 * Major improvements also for many other processor families, such as 691 Alpha, PowerPC, and Itanium. 692 * New sub-quadratic mpn_gcd and mpn_gcdext, as well as improved basecase 693 gcd code. 694 * The multiply FFT code has been slightly improved. 695 * Balanced multiplication now uses 4-way Toom in addition to schoolbook, 696 Karatsuba, 3-way Toom, and FFT. 697 * Unbalanced multiplication has been vastly improved. 698 * Improved schoolbook division by means of faster quotient approximation. 699 * Several new algorithms for division and mod by single limbs, giving 700 many-fold speedups. 701 * Improved nth root computations. 702 * The mpz_nextprime function uses sieving and is much faster. 703 * Countless minor tweaks. 704 705 Features: 706 * Updated support for fat binaries for x86_32 include current processors 707 * Lots of new mpn internal interfaces. Some of them will become public 708 in a future GMP release. 709 * Support for the 32-bit ABI under x86-apple-darwin. 710 * x86 CPU recognition code should now default better for future 711 processors. 712 * The experimental nails feature does not work in this release, but 713 it might be re-enabled in the future. 714 715 Misc: 716 * The gmp_version variable now always contains three parts. For this 717 release, it is "4.3.0". 718 719 720Changes between GMP version 4.2.3 and 4.2.4 721 722 Bugs: 723 * Fix bug with parsing exponent '+' sign in mpf. 724 * Fix an allocation bug in mpf_set_str, also affecting mpf_init_set_str, and 725 mpf_inp_str. 726 727 Speedups: 728 * None, except that proper processor recognition helps affected processors. 729 730 Features: 731 * Recognize new AMD processors. 732 733 734Changes between GMP version 4.2.2 and 4.2.3 735 736 Bugs: 737 * Fix x86 CPU recognition code to properly identify recent AMD and Intel 738 64-bit processors. 739 * The >> operator of the C++ wrapper gmpxx.h now does floor rounding, not 740 truncation. 741 * Inline semantics now follow the C99 standard, and works with recent GCC 742 releases. 743 * C++ bitwise logical operations work for more types. 744 * For C++, gmp.h now includes cstdio, improving compiler compatibility. 745 * Bases > 36 now work properly in mpf_set_str. 746 747 Speedups: 748 * None, except that proper processor recognition helps affected processors. 749 750 Features: 751 * The allocation functions now detect overflow of the mpz_t type. This means 752 that overflow will now cause an abort, except when the allocation 753 computation itself overflows. (Such overflow can probably only happen in 754 powering functions; we will detect powering overflow in the future.) 755 756 757Changes between GMP version 4.2.1 and 4.2.2 758 759 * License is now LGPL version 3. 760 761 Bugs: 762 * Shared library numbers corrected for libcxx. 763 * Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage. 764 Note that this only affects C++ programs. 765 * Fix crash in mpz_set_d for arguments with large negative exponent. 766 * Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist. 767 * Fix assembly syntax problem for powerpc-ibm-aix with AIX native assembler. 768 * Fix problems with x86 --enable-fat, where the compiler where told to 769 generate code for the build machine, not plain i386 code as it should. 770 * Improved recognition of powerpc systems wrt Altivec/VMX capability. 771 * Misc minor fixes, mainly workarounds for compiler/assembler bugs. 772 773 Speedups: 774 * "Core 2" and Pentium 4 processors, running in 64-bit mode will get a 775 slight boost as they are now specifically recognized. 776 777 Features: 778 * New support for x86_64-solaris 779 * New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin. 780 (Please see https://gmplib.org/macos.html for more information.) 781 782 783Changes between GMP version 4.2 and 4.2.1 784 785 Bugs: 786 * Shared library numbers corrected. 787 * Broken support for 32-bit AIX fixed. 788 * Misc minor fixes. 789 790 Speedups: 791 * Exact division (mpz_divexact) now falls back to plain division for large 792 operands. 793 794 Features: 795 * Support for some new systems. 796 797 798Changes between GMP version 4.1.4 and 4.2 799 800 Bugs: 801 * Minor bug fixes and code generalizations. 802 * Expanded and improved test suite. 803 804 Speedups: 805 * Many minor optimizations, too many to mention here. 806 * Division now always subquadratic. 807 * Computation of n-factorial much faster. 808 * Added basic x86-64 assembly code. 809 * Floating-point output is now subquadratic for all bases. 810 * FFT multiply code now about 25% faster. 811 * Toom3 multiply code faster. 812 813 Features: 814 * Much improved configure. 815 * Workarounds for many more compiler bugs. 816 * Temporary allocations are now made on the stack only if small. 817 * New systems supported: HPPA-2.0 gcc, IA-64 HP-UX, PowerPC-64 Darwin, 818 Sparc64 GNU/Linux. 819 * New i386 fat binaries, selecting optimised code at runtime (--enable-fat). 820 * New build option: --enable-profiling=instrument. 821 * New memory function: mp_get_memory_functions. 822 * New Mersenne Twister random numbers: gmp_randinit_mt, also now used for 823 gmp_randinit_default. 824 * New random functions: gmp_randinit_set, gmp_urandomb_ui, gmp_urandomm_ui. 825 * New integer functions: mpz_combit, mpz_rootrem. 826 * gmp_printf etc new type "M" for mp_limb_t. 827 * gmp_scanf and friends now accept C99 hex floats. 828 * Numeric input and output can now be in bases up to 62. 829 * Comparisons mpz_cmp_d, mpz_cmpabs_d, mpf_cmp_d recognise infinities. 830 * Conversions mpz_get_d, mpq_get_d, mpf_get_d truncate towards zero, 831 previously their behaviour was unspecified. 832 * Fixes for overflow issues with operands >= 2^31 bits. 833 834 Caveats: 835 * mpfr is gone, and will from now on be released only separately. Please see 836 www.mpfr.org. 837 838 839Changes between GMP version 4.1.3 and 4.1.4 840 841* Bug fix to FFT multiplication code (crash for huge operands). 842* Bug fix to mpf_sub (miscomputation). 843* Support for powerpc64-gnu-linux. 844* Better support for AMD64 in 32-bit mode. 845* Upwardly binary compatible with 4.1.3, 4.1.2, 4.1.1, 4.1, 4.0.1, 4.0, 846 and 3.x versions. 847 848 849Changes between GMP version 4.1.2 and 4.1.3 850 851* Bug fix for FFT multiplication code (miscomputation). 852* Bug fix to K6 assembly code for gcd. 853* Bug fix to IA-64 assembly code for population count. 854* Portability improvements, most notably functional AMD64 support. 855* mpz_export allows NULL for countp parameter. 856* Many minor bug fixes. 857* mpz_export allows NULL for countp parameter. 858* Upwardly binary compatible with 4.1.2, 4.1.1, 4.1, 4.0.1, 4.0, and 3.x 859 versions. 860 861 862Changes between GMP version 4.1.1 and 4.1.2 863 864* Bug fixes. 865 866 867Changes between GMP version 4.1 and 4.1.1 868 869* Bug fixes. 870* New systems supported: NetBSD and OpenBSD sparc64. 871 872 873Changes between GMP version 4.0.1 and 4.1 874 875* Bug fixes. 876* Speed improvements. 877* Upwardly binary compatible with 4.0, 4.0.1, and 3.x versions. 878* Asymptotically fast conversion to/from strings (mpz, mpq, mpn levels), but 879 also major speed improvements for tiny operands. 880* mpn_get_str parameter restrictions relaxed. 881* Major speed improvements for HPPA 2.0 systems. 882* Major speed improvements for UltraSPARC systems. 883* Major speed improvements for IA-64 systems (but still sub-optimal code). 884* Extended test suite. 885* mpfr is back, with many bug fixes and portability improvements. 886* New function: mpz_ui_sub. 887* New functions: mpz_export, mpz_import. 888* Optimization for nth root functions (mpz_root, mpz_perfect_power_p). 889* Optimization for extended gcd (mpz_gcdext, mpz_invert, mpn_gcdext). 890* Generalized low-level number format, reserving a `nails' part of each 891 limb. (Please note that this is really experimental; some functions 892 are likely to compute garbage when nails are enabled.) 893* Nails-enabled Alpha 21264 assembly code, allowing up to 75% better 894 performance. (Use --enable-nails=4 to enable it.) 895 896 897Changes between GMP version 4.0 and 4.0.1 898 899* Bug fixes. 900 901 902Changes between GMP version 3.1.1 and 4.0 903 904* Bug fixes. 905* Speed improvements. 906* Upwardly binary compatible with 3.x versions. 907* New CPU support: IA-64, Pentium 4. 908* Improved CPU support: 21264, Cray vector systems. 909* Support for all MIPS ABIs: o32, n32, 64. 910* New systems supported: Darwin, SCO, Windows DLLs. 911* New divide-and-conquer square root algorithm. 912* New algorithms chapter in the manual. 913* New malloc reentrant temporary memory method. 914* New C++ class interface by Gerardo Ballabio (beta). 915* Revamped configure, featuring ABI selection. 916* Speed improvements for mpz_powm and mpz_powm_ui (mainly affecting small 917 operands). 918* mpz_perfect_power_p now properly recognizes 0, 1, and negative perfect 919 powers. 920* mpz_hamdist now supports negative operands. 921* mpz_jacobi now accepts non-positive denominators. 922* mpz_powm now supports negative exponents. 923* mpn_mul_1 operand overlap requirements relaxed. 924* Float input and output uses locale specific decimal point where available. 925* New gmp_printf, gmp_scanf and related functions. 926* New division functions: mpz_cdiv_q_2exp, mpz_cdiv_r_2exp, mpz_divexact_ui. 927* New divisibility tests: mpz_divisible_p, mpz_divisible_ui_p, 928 mpz_divisible_2exp_p, mpz_congruent_p, mpz_congruent_ui_p, 929 mpz_congruent_2exp_p. 930* New Fibonacci function: mpz_fib2_ui. 931* New Lucas number functions: mpz_lucnum_ui, mpz_lucnum2_ui. 932* Other new integer functions: mpz_cmp_d, mpz_cmpabs_d, mpz_get_d_2exp, 933 mpz_init2, mpz_kronecker, mpz_lcm_ui, mpz_realloc2. 934* New rational I/O: mpq_get_str, mpq_inp_str, mpq_out_str, mpq_set_str. 935* Other new rational functions: mpq_abs, mpq_cmp_si, mpq_div_2exp, 936 mpq_mul_2exp, mpq_set_f. 937* New float tests: mpf_integer_p, mpf_fits_sint_p, mpf_fits_slong_p, 938 mpf_fits_sshort_p, mpf_fits_uint_p, mpf_fits_ulong_p, mpf_fits_ushort_p. 939* Other new float functions: mpf_cmp_d, mpf_get_default_prec, mpf_get_si, 940 mpf_get_ui, mpf_get_d_2exp. 941* New random functions: gmp_randinit_default, gmp_randinit_lc_2exp_size. 942* New demo expression string parser (see demos/expr). 943* New preliminary perl interface (see demos/perl). 944* Tuned algorithm thresholds for many more CPUs. 945 946 947Changes between GMP version 3.1 and 3.1.1 948 949* Bug fixes for division (rare), mpf_get_str, FFT, and miscellaneous minor 950 things. 951 952 953Changes between GMP version 3.0 and 3.1 954 955* Bug fixes. 956* Improved `make check' running more tests. 957* Tuned algorithm cutoff points for many machines. This will improve speed for 958 a lot of operations, in some cases by a large amount. 959* Major speed improvements: Alpha 21264. 960* Some speed improvements: Cray vector computers, AMD K6 and Athlon, Intel P5 961 and Pentium Pro/II/III. 962* The mpf_get_prec function now works as it did in GMP 2. 963* New utilities for auto-tuning and speed measuring. 964* Multiplication now optionally uses FFT for very large operands. (To enable 965 it, pass --enable-fft to configure.) 966* Support for new systems: Solaris running on x86, FreeBSD 5, HP-UX 11, Cray 967 vector computers, Rhapsody, Nextstep/Openstep, MacOS. 968* Support for shared libraries on 32-bit HPPA. 969* New integer functions: mpz_mul_si, mpz_odd_p, mpz_even_p. 970* New Kronecker symbol functions: mpz_kronecker_si, mpz_kronecker_ui, 971 mpz_si_kronecker, mpz_ui_kronecker. 972* New rational functions: mpq_out_str, mpq_swap. 973* New float functions: mpf_swap. 974* New mpn functions: mpn_divexact_by3c, mpn_tdiv_qr. 975* New EXPERIMENTAL function layer for accurate floating-point arithmetic, mpfr. 976 To try it, pass --enable-mpfr to configure. See the mpfr subdirectory for 977 more information; it is not documented in the main GMP manual. 978 979 980Changes between GMP version 3.0 and 3.0.1 981 982* Memory leaks in gmp_randinit and mpz_probab_prime_p fixed. 983* Documentation for gmp_randinit fixed. Misc documentation errors fixed. 984 985 986Changes between GMP version 2.0 and 3.0 987 988* Source level compatibility with past releases (except mpn_gcd). 989* Bug fixes. 990* Much improved speed thanks to both host independent and host dependent 991 optimizations. 992* Switch to autoconf/automake/libtool. 993* Support for building libgmp as a shared library. 994* Multiplication and squaring using 3-way Toom-Cook. 995* Division using the Burnikel-Ziegler method. 996* New functions computing binomial coefficients: mpz_bin_ui, mpz_bin_uiui. 997* New function computing Fibonacci numbers: mpz_fib_ui. 998* New random number generators: mpf_urandomb, mpz_rrandomb, mpz_urandomb, 999 mpz_urandomm, gmp_randclear, gmp_randinit, gmp_randinit_lc_2exp, 1000 gmp_randseed, gmp_randseed_ui. 1001* New function for quickly extracting limbs: mpz_getlimbn. 1002* New functions performing integer size tests: mpz_fits_sint_p, 1003 mpz_fits_slong_p, mpz_fits_sshort_p, mpz_fits_uint_p, mpz_fits_ulong_p, 1004 mpz_fits_ushort_p. 1005* New mpf functions: mpf_ceil, mpf_floor, mpf_pow_ui, mpf_trunc. 1006* New mpq function: mpq_set_d. 1007* New mpz functions: mpz_addmul_ui, mpz_cmpabs, mpz_cmpabs_ui, mpz_lcm, 1008 mpz_nextprime, mpz_perfect_power_p, mpz_remove, mpz_root, mpz_swap, 1009 mpz_tdiv_ui, mpz_tstbit, mpz_xor. 1010* New mpn function: mpn_divexact_by3. 1011* New CPU support: DEC Alpha 21264, AMD K6 and Athlon, HPPA 2.0 and 64, 1012 Intel Pentium Pro and Pentium-II/III, Sparc 64, PowerPC 64. 1013* Almost 10 times faster mpz_invert and mpn_gcdext. 1014* The interface of mpn_gcd has changed. 1015* Better support for MIPS R4x000 and R5000 under Irix 6. 1016* Improved support for SPARCv8 and SPARCv9 processors. 1017 1018 1019Changes between GMP version 2.0 and 2.0.2 1020 1021* Many bug fixes. 1022 1023 1024Changes between GMP version 1.3.2 and 2.0 1025 1026* Division routines in the mpz class have changed. There are three classes of 1027 functions, that rounds the quotient to -infinity, 0, and +infinity, 1028 respectively. The first class of functions have names that begin with 1029 mpz_fdiv (f is short for floor), the second class' names begin with mpz_tdiv 1030 (t is short for trunc), and the third class' names begin with mpz_cdiv (c is 1031 short for ceil). 1032 1033 The old division routines beginning with mpz_m are similar to the new 1034 mpz_fdiv, with the exception that some of the new functions return useful 1035 values. 1036 1037 The old function names can still be used. All the old functions names will 1038 now do floor division, not trunc division as some of them used to. This was 1039 changed to make the functions more compatible with common mathematical 1040 practice. 1041 1042 The mpz_mod and mpz_mod_ui functions now compute the mathematical mod 1043 function. I.e., the sign of the 2nd argument is ignored. 1044 1045* The mpq assignment functions do not canonicalize their results. A new 1046 function, mpq_canonicalize must be called by the user if the result is not 1047 known to be canonical. 1048* The mpn functions are now documented. These functions are intended for 1049 very time critical applications, or applications that need full control over 1050 memory allocation. Note that the mpn interface is irregular and hard to 1051 use. 1052* New functions for arbitrary precision floating point arithmetic. Names 1053 begin with `mpf_'. Associated type mpf_t. 1054* New and improved mpz functions, including much faster GCD, fast exact 1055 division (mpz_divexact), bit scan (mpz_scan0 and mpz_scan1), and number 1056 theoretical functions like Jacobi (mpz_jacobi) and multiplicative inverse 1057 (mpz_invert). 1058* New variable types (mpz_t and mpq_t) are available that makes syntax of 1059 mpz and mpq calls nicer (no need for & before variables). The MP_INT and 1060 MP_RAT types are still available for compatibility. 1061* Uses GNU configure. This makes it possible to choose target architecture 1062 and CPU variant, and to compile into a separate object directory. 1063* Carefully optimized assembly for important inner loops. Support for DEC 1064 Alpha, Amd 29000, HPPA 1.0 and 1.1, Intel Pentium and generic x86, Intel 1065 i960, Motorola MC68000, MC68020, MC88100, and MC88110, Motorola/IBM 1066 PowerPC, National NS32000, IBM POWER, MIPS R3000, R4000, SPARCv7, 1067 SuperSPARC, generic SPARCv8, and DEC VAX. Some support also for ARM, 1068 Clipper, IBM ROMP (RT), and Pyramid AP/XP. 1069* Faster. Thanks to the assembler code, new algorithms, and general tuning. 1070 In particular, the speed on machines without GCC is improved. 1071* Support for machines without alloca. 1072* Now under the LGPL. 1073 1074INCOMPATIBILITIES BETWEEN GMP 1 AND GMP 2 1075 1076* mpq assignment functions do not canonicalize their results. 1077* mpz division functions round differently. 1078* mpz mod functions now really compute mod. 1079* mpz_powm and mpz_powm_ui now really use mod for reduction. 1080