From vincent at vinc17.net Wed Jan 9 00:47:02 2019 From: vincent at vinc17.net (Vincent Lefevre) Date: Wed, 9 Jan 2019 01:47:02 +0100 Subject: GNU MPFR 4.0.2 Release Candidate Message-ID: <20190109004702.GC32130@zira.vinc17.org> The release of GNU MPFR 4.0.2 ("dinde aux marrons", patch level 2) is imminent. Please help to make this release as good as possible by downloading and testing this release candidate: https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc1.tar.xz https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc1.tar.bz2 https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc1.tar.gz https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc1.zip The SHA1 digests: c0b15940b703d55a05acdc61781962eb3d0bf857 mpfr-4.0.2-rc1.tar.bz2 fd4bc91650ad6cf549c9a036f036d62b26b47ac2 mpfr-4.0.2-rc1.tar.gz 535d06909eff58c8541250a222bd97a96aa5422c mpfr-4.0.2-rc1.tar.xz 3295000419ca52ebbbd17fdb889bbe7d3e7242bf mpfr-4.0.2-rc1.zip The SHA256 digests: 60626832f47a51fe24dc366cadbf2157a085b62ac634526f0d03e5c987de59ae mpfr-4.0.2-rc1.tar.bz2 58b561c76b30e9ef14961345d16e532bea89e08e3590b5394cd396b1c17a8ce7 mpfr-4.0.2-rc1.tar.gz 4fc4cee96878d2c947d488e8fc11b59877eb8d108c000634f39e6f3520ea04ea mpfr-4.0.2-rc1.tar.xz a3e4ec355db75c88a132e19d1bd3c3bcb72db23a0a21272a64fb8ac0da4e484f mpfr-4.0.2-rc1.zip The signatures: https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc1.tar.xz.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc1.tar.bz2.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc1.tar.gz.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc1.zip.asc Each tarball is signed by Vincent Lef?vre. This can be verified using the DSA key ID 980C197698C3739D; this key can be retrieved with: gpg --recv-keys 980C197698C3739D or by downloading it from . The key fingerprint is: 07F3 DBBE CC1A 3960 5078 094D 980C 1976 98C3 739D The signatures can be verified with: gpg --verify You should check that the key fingerprint matches. Changes from version 4.0.1 to version 4.0.2: - Corrected minimal GMP version in the INSTALL file and the MPFR manual. - Improved MPFR manual. In particular, corrected/completed the mpfr_get_str description in order to follow the historical behavior and GMP's mpf_get_str function. - Bug fixes (see ChangeLog file). Please send success and failure reports with "./config.guess" output to . If no problems are found, GNU MPFR 4.0.2 should be released around 2019-01-23. Regards, -- Vincent Lef?vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From sjneph at gmail.com Fri Jan 18 18:03:29 2019 From: sjneph at gmail.com (Shane Neph) Date: Fri, 18 Jan 2019 10:03:29 -0800 Subject: Feature request for function mpz_primorial_ui Message-ID: This is a useful function. Thank you for providing it. Since it goes through the trouble of finding and multiplying out all prime numbers <= n, it would be even better if it also returned an unsigned long int that gives the number of primes found and used in the calculation. From elzoog4180 at yahoo.com Thu Jan 24 17:02:53 2019 From: elzoog4180 at yahoo.com (Brian Dean) Date: Thu, 24 Jan 2019 17:02:53 +0000 (UTC) Subject: Memory leak in the following program. References: <2039412013.547753.1548349373562.ref@mail.yahoo.com> Message-ID: <2039412013.547753.1548349373562@mail.yahoo.com> Since I am new to GMP, I don't know if this is a bug or if it's a result of my poor programming.? However, here is the relevant code.? If I compile this code using g++ and then run it, the amount of memory it will take up will increase gradually.? Before, it was increasing quite rapidly (as in eating up about 2 GB every few seconds).? I fixed it a little by rewriting the numdivs function to allocating the mpz_t variables at the beginning (rather than inside of the while loop). Any help would be appreciated. __________________#include #include const int numprimes = 1000; static int primelist[numprimes]; void initprimelist() { ?? ?primelist[0] = 2; ?? ?primelist[1] = 3; ?? ?primelist[2] = 5; ?? ?primelist[3] = 7; ?? ?int test = 7; ?? ?int mod3int = 7 % 3; ?? ?int loc = 4; ?? ?while (loc < numprimes) { ?? ??? ?if (mod3int == 1) { ?? ??? ??? ?test += 4; ?? ??? ??? ?mod3int = 2; ?? ??? ?} else { ?? ??? ??? ?test += 2; ?? ??? ??? ?mod3int = 1; ?? ??? ?} ?? ??? ?int isprime = 1; ?? ??? ?for (int i=0; i (sqvar - 1)) { ?? ??? ??? ??? ?if ((test % primelist[i]) == 0) { ?? ??? ??? ??? ??? ?isprime = 0; ?? ??? ??? ??? ?} ?? ??? ??? ?} ?? ??? ?} ?? ??? ?if (isprime) { ?? ??? ??? ?primelist[loc] = test; ?? ??? ??? ?loc++; ?? ??? ?} ?? ?} } unsigned long numdivs(mpz_t var) { ?? ?mpz_t tmpvar, modr, tmp; ?? ?mpz_init(modr); ?? ?mpz_init(tmp); ?? ?mpz_init_set(tmpvar, var); ?? ?unsigned long retval = 1; ?? ?int loc = 0; ?? ?while (mpz_cmp_ui(tmpvar, 1) > 0) { ?? ??? ?unsigned int tmpdivs = 0; ?? ??? ?mpz_mod_ui (modr, tmpvar, primelist[loc]); ?? ??? ?while (mpz_cmp_ui(modr, 0) == 0) { ?? ??? ??? ?mpz_fdiv_q_ui (tmp, tmpvar, primelist[loc]); ?? ??? ??? ?mpz_set(tmpvar, tmp); ?? ??? ??? ?mpz_mod_ui (modr, tmpvar, primelist[loc]); ?? ??? ??? ?tmpdivs++; ?? ??? ?} ?? ??? ?retval *= (tmpdivs + 1); ?? ??? ?loc++; ?? ??? ?if (loc >= numprimes) { ?? ??? ??? ?return retval; ?? ??? ?} ?? ?} ?? ?return retval; } int main() { ?? ?mpz_t six_t, test, var, tmp; ?? ?mpz_init(var); ?? ?mpz_init(tmp); ?? ?initprimelist(); ?? ?// DivisorList *divlist = new DivisorList(); ?? ?// Start with 13 ?? ?mpz_init_set_ui (six_t, 6); ??? mpz_init_set_ui (test, 13); ??? unsigned long maxdivs = 1; ??? while (1) { ?? ??? ?mpz_sub_ui (var, test, 1); ?? ??? ?unsigned long ndivs = numdivs(var); ?? ??? ?if (ndivs > maxdivs) { ?? ??? ??? ?mpz_out_str(stdout, 10, test); ?? ??? ??? ?printf("?? %d\n", ndivs); ?? ??? ??? ?maxdivs = ndivs; ?? ??? ??? ?fflush(stdout); ?? ??? ?} ?? ??? ?mpz_add (tmp, test, six_t); ?? ??? ?mpz_set(test, tmp); ?? ??? ?while (mpz_probab_prime_p (test, 15) == 0) { ?? ??? ??? ?mpz_add (tmp, test, six_t); ?? ??? ??? ?mpz_set (test, tmp); ?? ??? ?} ??? } } From Paul.Zimmermann at inria.fr Thu Jan 24 17:39:52 2019 From: Paul.Zimmermann at inria.fr (paul zimmermann) Date: Thu, 24 Jan 2019 18:39:52 +0100 Subject: Memory leak in the following program. In-Reply-To: <2039412013.547753.1548349373562@mail.yahoo.com> (message from Brian Dean on Thu, 24 Jan 2019 17:02:53 +0000 (UTC)) References: <2039412013.547753.1548349373562.ref@mail.yahoo.com> <2039412013.547753.1548349373562@mail.yahoo.com> Message-ID: Dear Brian, please look for mpz_clear in the fine GMP manual. Paul Zimmermann From bodrato at mail.dm.unipi.it Sat Jan 26 09:46:16 2019 From: bodrato at mail.dm.unipi.it (Marco Bodrato) Date: Sat, 26 Jan 2019 10:46:16 +0100 Subject: Feature request for function mpz_primorial_ui In-Reply-To: References: Message-ID: Ciao, Il Ven, 18 Gennaio 2019 7:03 pm, Shane Neph ha scritto: > This is a useful function. Thank you for providing it. Since it goes You are welcome! > through the trouble of finding and multiplying out all prime numbers <= n, > it would be even better if it also returned an unsigned long int that > gives the number of primes found and used in the calculation. We may think about an interface for counting primes (only in the unsigned long range?) or looping on them... The feature you propose would not need a big effort, but it would require a different interface, for this reason its adoption in the project can not be assured. For your experiments, you can get the current development library, from the repository https://gmplib.org/repo/gmp/ or from a snapshot https://gmplib.org/download/snapshot/ and apply the attached patch before compiling and testing. It provides an mpz_primorial_ui function that (also) returns the number of prime factors of the result. But beware, both the LICENSE and the INTERFACE will be changed! (And the documentation will not change accordingly :-/ ) ?is, m -- http://bodrato.it/papers/ -------------- next part -------------- A non-text attachment was scrubbed... Name: nombranta_primorial.patch Type: text/x-patch Size: 5639 bytes Desc: not available URL: From vincent at vinc17.net Mon Jan 28 01:37:25 2019 From: vincent at vinc17.net (Vincent Lefevre) Date: Mon, 28 Jan 2019 02:37:25 +0100 Subject: GNU MPFR 4.0.2 Release Candidate 2 Message-ID: <20190128013725.GB3454@zira.vinc17.org> The release of GNU MPFR 4.0.2 ("dinde aux marrons", patch level 2) is imminent. Please help to make this release as good as possible by downloading and testing this release candidate: https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc2.tar.xz https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc2.tar.bz2 https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc2.tar.gz https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc2.zip The SHA1 digests: 99f3a07e2de84aa171b6f6c798607525fd963cac mpfr-4.0.2-rc2.tar.bz2 363bcb341a6e042fc0e5ae4b4b78bdbc3826274a mpfr-4.0.2-rc2.tar.gz 1b6c6d258879fd6f2880e7f4f2be6348cccd4cc7 mpfr-4.0.2-rc2.tar.xz 747d7f46a82d951b4d1862c53a07b49e1bf19058 mpfr-4.0.2-rc2.zip The SHA256 digests: 25fc8d93e4625f10fe13d1e3b968a72306f7c75217d28e69647400490094d877 mpfr-4.0.2-rc2.tar.bz2 f4d1e0416bd8566c29aa9adfdfdd35b09b9f047485c15e5f5b107a1a047d5027 mpfr-4.0.2-rc2.tar.gz 707f8c14d892d71668aebb269ffffa63efaec387630cc8c6db4e27e4948af021 mpfr-4.0.2-rc2.tar.xz 1380fe676548e241da316ca45da5f60e7ab0067d054ffb80ea67333738514f3e mpfr-4.0.2-rc2.zip The signatures: https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc2.tar.xz.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc2.tar.bz2.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc2.tar.gz.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2-rc2.zip.asc Each tarball is signed by Vincent Lef?vre. This can be verified using the DSA key ID 980C197698C3739D; this key can be retrieved with: gpg --recv-keys 980C197698C3739D or by downloading it from . The key fingerprint is: 07F3 DBBE CC1A 3960 5078 094D 980C 1976 98C3 739D The signatures can be verified with: gpg --verify You should check that the key fingerprint matches. Changes from version 4.0.1 to version 4.0.2: - Corrected minimal GMP version in the INSTALL file and the MPFR manual. - Shared caches: cleanup; really detect lock failures (abort in this case). - Improved MPFR manual. In particular, corrected/completed the mpfr_get_str description in order to follow the historical behavior and GMP's mpf_get_str function. - Bug fixes (see ChangeLog file). Please send success and failure reports with "./config.guess" output to . If no problems are found, GNU MPFR 4.0.2 should be released around 2019-01-31. Regards, -- Vincent Lef?vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From vincent at vinc17.net Thu Jan 31 23:06:55 2019 From: vincent at vinc17.net (Vincent Lefevre) Date: Fri, 1 Feb 2019 00:06:55 +0100 Subject: Announce: GNU MPFR 4.0.2 is released Message-ID: <20190131230655.GG27412@zira.vinc17.org> GNU MPFR 4.0.2 ("dinde aux marrons", patch level 2), a C library for multiple-precision floating-point computations with correct rounding, is now available for download from the MPFR web site: https://www.mpfr.org/mpfr-4.0.2/ from InriaForge: https://gforge.inria.fr/projects/mpfr/ and from the GNU FTP site: https://ftp.gnu.org/gnu/mpfr/ Thanks very much to those who sent us bug reports and/or tested the release candidate. The SHA1 digests: d6a313a3b1ceb9ff3be71cd18e45468837b7fd53 mpfr-4.0.2.tar.bz2 ade94aa28e181540763d6698c6c9fae795be8b75 mpfr-4.0.2.tar.gz 52c1f2a4c9a202f46cf3275a8d46b562aa584208 mpfr-4.0.2.tar.xz 194ea07b9df25203ae20b2be40c66ee70744edc6 mpfr-4.0.2.zip The SHA256 digests: c05e3f02d09e0e9019384cdd58e0f19c64e6db1fd6f5ecf77b4b1c61ca253acc mpfr-4.0.2.tar.bz2 ae26cace63a498f07047a784cd3b0e4d010b44d2b193bab82af693de57a19a78 mpfr-4.0.2.tar.gz 1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a mpfr-4.0.2.tar.xz c956921dcf0df8d3bd84a3552ded6dc115a7d6e5224ad2982905c5e777db818d mpfr-4.0.2.zip The signatures: https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.xz.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.bz2.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.gz.asc https://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.zip.asc Each tarball is signed by Vincent Lef?vre. This can be verified using the DSA key ID 980C197698C3739D; this key can be retrieved with: gpg --recv-keys 980C197698C3739D or by downloading it from . The key fingerprint is: 07F3 DBBE CC1A 3960 5078 094D 980C 1976 98C3 739D The signatures can be verified with: gpg --verify You should check that the key fingerprint matches. Changes from version 4.0.1 to version 4.0.2: - Corrected minimal GMP version in the INSTALL file and the MPFR manual. - Option -pedantic is now always removed from __GMP_CFLAGS (see INSTALL). - Shared caches: cleanup; really detect lock failures (abort in this case). - Improved MPFR manual. In particular, corrected/completed the mpfr_get_str description in order to follow the historical behavior and GMP's mpf_get_str function. - Bug fixes (see ChangeLog file). You can send success and failure reports to , and give us the canonical system name (by running the "./config.guess" script), the processor and the compiler version, in order to complete the "Platforms Known to Support MPFR" section of the MPFR 4.0.2 web page. Regards, -- Vincent Lef?vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)