summaryrefslogtreecommitdiff
path: root/src/mpfr-mini-gmp.c
Commit message (Collapse)AuthorAgeFilesLines
* Copyright notice update: added 2021 withvlefevre2021-01-031-1/+1
| | | | | | | | perl -pi -e 's/ (\d{4}-)?(2020)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2020 from the example in the doc/README.dev file. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14229 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Fixed bug in gmp_urandomb_ui when the parameter nvlefevre2020-09-151-3/+5
| | | | | | | | | is equal to the width of unsigned long. Note: This case occurs in function random_deviate_generate() from src/random_deviate.c with a 32-bit ABI (thus 32-bit unsigned long) since n = W, which is defined as 32. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14117 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Simplified gmp_randseed_ui (note: the code invlefevre2020-09-141-9/+3
| | | | | | | r14114 and r14115 was not the intended one due to the wrong variable in srand). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14116 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Corrected latest change for gmp_randseed_ui.vlefevre2020-09-141-1/+1
| | | | git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14115 280ebfd0-de03-0410-8827-d642c229c3f4
* With mini-gmp, use the standard rand() and srand() functions instead ofvlefevre2020-09-141-20/+28
| | | | | | the POSIX (thus less portable) lrand48() and srand48(). git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14114 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] For gmp_randseed_ui, which uses srand48, usevlefevre2020-06-101-1/+3
| | | | | | a portable version of the conversion from unsigned long to long. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13960 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2020 withvlefevre2020-01-081-1/+1
| | | | | | | | perl -pi -e 's/ (\d{4}-)?(2019)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2019 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13652 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated the www.gnu.org URL's (http → https) on all the files with:vlefevre2019-01-071-1/+1
| | | | | | | perl -pi -e 's,http://www.gnu.org/,https://www.gnu.org/,g' **/*(.) under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13372 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2019 withvlefevre2019-01-011-1/+1
| | | | | | | | perl -pi -e 's/ (\d{4}-)?(2018)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2018 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13359 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Added missing "void" in function prototype.vlefevre2018-12-051-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13320 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] put back unconditional assert from r13316 (removed by ↵zimmerma2018-12-051-0/+1
| | | | | | error) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13318 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] improved random_limb (the low bits of lrand48 are bad)zimmerma2018-12-051-23/+46
| | | | | | | and fixed gmp_urandomm_ui git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13317 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] gmp_urandomm_ui: added a MPFR_ASSERTNvlefevre2018-12-051-1/+2
| | | | | | unconditionally, as n == 0 is always forbidden. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13316 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] the static assert introduced in r13313 makes thezimmerma2018-12-051-2/+5
| | | | | | | | compilation fail for 8-bit limbs, while the code was valid for n <= 256 in that case git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13315 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Fixed types.vlefevre2018-12-041-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13314 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Added a static assertion to make sure thatvlefevre2018-12-041-0/+2
| | | | | | the MPFR_ASSERTD added in r13312 is valid. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13313 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] gmp_urandomm_ui did not generate uniform valueszimmerma2018-12-041-1/+12
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13312 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Missing #else (from r13156).vlefevre2018-09-191-0/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13226 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] added #if 0 ... #endif for mpz_dump (unused)zimmerma2018-09-171-0/+2
| | | | | | | [src/mul_ui.c] fixed compiler warning for limb < long git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13210 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Removed #include "mpfr-mini-gmp.h" as this includevlefevre2018-09-121-2/+0
| | | | | | | is already done in mpfr-impl.h (in both cases, when MPFR_USE_MINI_GMP is defined). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13176 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] fixed another compiler warningzimmerma2018-09-071-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13159 280ebfd0-de03-0410-8827-d642c229c3f4
* adapt to 8-bit limbs (work in progress)zimmerma2018-09-071-2/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13156 280ebfd0-de03-0410-8827-d642c229c3f4
* Removed trailing whitespace.vlefevre2018-09-061-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13148 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] fixed gmp_urandomb_ui for 16-bit limb, added mpz_dumpzimmerma2018-09-051-0/+56
| | | | | | | [tests/terandom_chisq.c] more details in case of error git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13134 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Fixed potential undefined behavior (when mp_limb_tvlefevre2018-08-311-1/+1
| | | | | | is defined as an unsigned short) with MPFR_LIMB_LSHIFT. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13102 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] fix for 16-bit limbzimmerma2018-08-311-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13085 280ebfd0-de03-0410-8827-d642c229c3f4
* [mpfr-mini-gmp.c] fix for 16-bit limbzimmerma2018-08-301-1/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13079 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2018 withvlefevre2018-01-031-1/+1
| | | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2017)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the ck-mparam and timings-mpfr.c files and the mbench directory under "tools" (not distributed with MPFR). Removed 2017 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12067 280ebfd0-de03-0410-8827-d642c229c3f4
* got rid of mpz_dump (undocumented in GMP)zimmerma2017-12-061-11/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11927 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] updated with GMP 6.1.2zimmerma2017-12-061-62/+44
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11926 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed compiler warnings with mini-gmpzimmerma2017-12-051-0/+7
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11894 280ebfd0-de03-0410-8827-d642c229c3f4
* make compilation work again (make + make check) with mini-gmpzimmerma2017-12-041-25/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11891 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2017 withvlefevre2017-01-011-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2016)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the tools/mbench directory (not distributed with MPFR). Removed 2016 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11117 280ebfd0-de03-0410-8827-d642c229c3f4
* Replacedvlefevre2016-02-041-1/+1
| | | | | | | | Contributed by the AriC and Caramel projects by Contributed by the AriC and Caramba projects git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9941 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2016 withvlefevre2016-01-011-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2015)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh (the m4 and tools/mbench directories were not modified). Removed 2015 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9779 280ebfd0-de03-0410-8827-d642c229c3f4
* more tests do work with mini-gmp (from GMP 6.1.0-rc1)zimmerma2015-10-291-3/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9708 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed replacement for mpn_neg (return value was wrong)zimmerma2015-10-291-1/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9704 280ebfd0-de03-0410-8827-d642c229c3f4
* adapt for mini-gmp (from GMP 6.1.0-rc1)zimmerma2015-10-291-22/+25
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9703 280ebfd0-de03-0410-8827-d642c229c3f4
* adapt mini-gmp stuff to GMP 6.1.0-rc1zimmerma2015-10-281-109/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9701 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2015 withvlefevre2015-02-131-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2014)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the tools/mbench directory (not distributed with MPFR). Removed 2014 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9278 280ebfd0-de03-0410-8827-d642c229c3f4
* Renamed WANT_MINI_GMP to MPFR_USE_MINI_GMP as it is used in mpfr.hvlefevre2014-07-021-3/+3
| | | | | | | (all MPFR macros that appear there should start with MPFR_ to avoid conflicts with other software). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9129 280ebfd0-de03-0410-8827-d642c229c3f4
* More code clean-up (for both consistency and readability):vlefevre2014-06-251-1/+1
| | | | | | | | | | | | | | | * Use the simple mp_limb_t constants when possible. * New internal macro MPFR_IS_NORMALIZED. Note: this was done with perl -pi -e ' s/~ *\(mp_limb_t\) *0/MPFR_LIMB_MAX/g; s/\(mp_limb_t\) *-1/MPFR_LIMB_MAX/g; s/\(mp_limb_t\) *0/MPFR_LIMB_ZERO/g; s/\(mp_limb_t\) *1L?/MPFR_LIMB_ONE/g' {src,tests}/*.{c,h} svn revert src/mpfr-impl.h and some manual changes. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9091 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Use lower case for function parameters.vlefevre2014-01-241-45/+45
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8894 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed memory leakzimmerma2014-01-181-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8791 280ebfd0-de03-0410-8827-d642c229c3f4
* more progress with mini-gmp:zimmerma2014-01-181-0/+2
| | | | | | | | | | ======================= 9 of 157 tests failed (13 tests were not run) ======================= git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8776 280ebfd0-de03-0410-8827-d642c229c3f4
* some progress with mini-gmp:zimmerma2014-01-171-11/+30
| | | | | | | | | | ======================= 34 of 157 tests failed (13 tests were not run) ======================= git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8764 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-mini-gmp.c] Removed trailing spaces.vlefevre2014-01-171-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8761 280ebfd0-de03-0410-8827-d642c229c3f4
* Avoid an empty translation unit (see ISO C99, 6.9). Some errors couldvlefevre2014-01-171-1/+5
| | | | | | be triggered with "gcc -std=c99 -pedantic-errors". git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8756 280ebfd0-de03-0410-8827-d642c229c3f4
* more progress for the mini-gmp interfacezimmerma2014-01-171-5/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8755 280ebfd0-de03-0410-8827-d642c229c3f4
* added two new files for mini-gmp interfacezimmerma2014-01-161-0/+322
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8754 280ebfd0-de03-0410-8827-d642c229c3f4