summaryrefslogtreecommitdiff
path: root/src/sub1sp.c
Commit message (Collapse)AuthorAgeFilesLines
* [src/sub1sp.c] fixed bug in mpfr_sub1sp2()zimmerma2017-12-131-0/+1
| | | | | | | [tests/tsub1sp.c] added non-regression test git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11974 280ebfd0-de03-0410-8827-d642c229c3f4
* get rid of DEBUG macro (but keep corresponding commands in comment to helpzimmerma2017-12-111-32/+22
| | | | | | | understanding of the code and debugging) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11955 280ebfd0-de03-0410-8827-d642c229c3f4
* [src] Replaced some "return 0" by "MPFR_RET (0)" (the generated codevlefevre2017-12-071-11/+8
| | | | | | | | is the same as shown by gcc, thanks to an obvious optimization; this is semantically better, which could help provers, and would allow code instrumentation in the future, if need be). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11928 280ebfd0-de03-0410-8827-d642c229c3f4
* [src] Clean up of debugging output functions:vlefevre2017-09-291-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Replaced the internal function mpfr_fprint_binary by a new internal function mpfr_fdump, similar to mpfr_dump, but with a FILE * argument. * Got rid of mpfr_print_binary entirely (it became internal in r2466 for MPFR 2.0.2, released in 2003). Details: * print_raw.c: - moved the mpfr_fprint_binary code to dump.c; - removed mpfr_print_binary. * dump.c: - mpfr_fprint_binary (from print_raw.c) is now defined as static; - added function mpfr_fdump, using mpfr_fprint_binary; - mpfr_dump: use mpfr_fdump instead of the old mpfr_print_binary. * mpfr-impl.h: - replaced mpfr_fprint_binary declaration by mpfr_fdump; - removed mpfr_print_binary declaration. * add1sp.c, mul.c, sub1sp.c: replaced mpfr_fprint_binary by mpfr_fdump and removed the '\n', now output by mpfr_fdump. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11761 280ebfd0-de03-0410-8827-d642c229c3f4
* Merged the latest changes from the trunk, including some old changesetsvlefevre2017-05-041-51/+57
|\ | | | | | | | | | | | | | | | | | | | | related to mpfr_zeta that were skipped, resolving conflicts. Added RNDF support to new code introduced by this merge: * mpfr_mul_1n in src/mul.c (from r11281); * mpfr_sqr_1n in src/sqr.c (from r11283); * mpfr_div_1n in src/div.c (from r11284); * mpfr_sqrt1n in src/sqrt.c (from r11293). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11456 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Added blank lines for readability (like in add1sp.c).vlefevre2017-04-271-0/+2
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11440 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/mul.c] added special code for prec=GMP_NUMB_BITSzimmerma2017-02-081-52/+56
| | | | | | | | | | | | | | | | [src/add1sp.c] use special code only when MPFR_GENERIC_ABI is not defined [src/sub1sp.c] idem as above git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11281 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] new function for p=GMP_NUMB_BITS, fixed bug in mpfr_sub1sp3zimmerma2017-02-081-1/+207
| | | | | | | | | | | | | | [tests/tsub1sp.c] added new tests git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11279 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] fixed a bug in mpfr_sub1sp1 and mpfr_sub1sp2 (corner case)zimmerma2017-02-081-6/+29
| | | | | | | | | | | | | | [tests/tsub1sp.c] added non-regression test git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11272 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Added MPFR_FULLSUB code for mpfr_sub1sp2.vlefevre2017-01-251-0/+6
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11233 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Added refs to missed/broken optimization with Clang/LLVM.vlefevre2017-01-251-1/+5
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11229 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Use the FULLSUB only. Added a comment about the changevlefevre2017-01-251-8/+7
| | | | | | | | | | | | in r11227. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11228 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] changed MPFR_FULLSUB variant into faster codezimmerma2017-01-251-1/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11227 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Updated comments about subtraction with borrow; the firstvlefevre2017-01-231-3/+7
| | | | | | | | | | | | | | one from r11213 was incorrect (bad interpretation of the generated code for GCC, potentially on a different alternate source code for Clang). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11223 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] simplified mpfr_sub1sp1()zimmerma2017-01-231-12/+8
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11222 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Updated TODO, mentioning an optimization bug in LLVM.vlefevre2017-01-201-1/+3
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11215 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Updated TODO about full subtraction with borrow.vlefevre2017-01-201-1/+4
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11214 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Added alternate code (enabled with -DMPFR_FULLSUB, untilvlefevre2017-01-201-0/+11
| | | | | | | | | | | | | | fully tested) to replace a test + correction by a 2-limb subtraction, recognized by GCC and Clang. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11213 280ebfd0-de03-0410-8827-d642c229c3f4
| * fixed bug in urandomb.c reported by Dominic Chenzimmerma2017-01-121-2/+2
| | | | | | | | | | | | | | | | (https://sympa.inria.fr/sympa/arc/mpfr/2017-01/msg00011.html) and replaced MPN_COPY_INCR/MPN_COPY_DECR by mpn_copyi/mpn_copyd git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11193 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/div.c] added FIXMEzimmerma2017-01-101-0/+4
| | | | | | | | | | | | | | [src/sub1sp.c] added comments git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11183 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Fixed other two bugs in special code for 3 limbs.vlefevre2017-01-101-2/+6
| | | | | | | | | | | | TODO: non-regression tests should be added for both. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11178 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Fixed some bugs in special code for 3 limbs.vlefevre2017-01-101-1/+4
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11177 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Simplified a test.vlefevre2017-01-101-1/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11176 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] added special code for 3 limbszimmerma2017-01-091-1/+307
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11173 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] fixed bug in mpfr_sub1sp2 when exponent diff. is GMP_NUMB_BITSzimmerma2017-01-091-3/+4
| | | | | | | | | | | | | | [tests/tsub1sp.c] added testcase git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11162 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/mul.c] added mpfr_mul_3zimmerma2017-01-081-1/+1
| | | | | | | | | | | | | | | | [src/sqrt.c] renamed internal functions [src/sub1sp.c] cosmetic change git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11158 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
| * [add/sub] added MPFR_UNLIKELY when adding one ulp changes the binadezimmerma2016-12-131-2/+2
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11034 280ebfd0-de03-0410-8827-d642c229c3f4
| * [sub1sp.c] added comment + assertzimmerma2016-12-091-3/+9
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11003 280ebfd0-de03-0410-8827-d642c229c3f4
| * [sub1sp.c] in mpfr_sub1sp2(), compute a0 before a1 whenever possiblezimmerma2016-12-091-11/+15
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10999 280ebfd0-de03-0410-8827-d642c229c3f4
| * Replaced two ~0 with mp_limb_t target by MPFR_LIMB_MAX.vlefevre2016-12-081-1/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10995 280ebfd0-de03-0410-8827-d642c229c3f4
| * improved add1sp.c and sub1sp.c like in r10991zimmerma2016-12-081-32/+42
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10993 280ebfd0-de03-0410-8827-d642c229c3f4
| * [sub1sp.c] improved furtherzimmerma2016-12-081-56/+56
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10991 280ebfd0-de03-0410-8827-d642c229c3f4
| * [sub1sp.c] corrected a comment, added another onezimmerma2016-12-071-4/+7
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10987 280ebfd0-de03-0410-8827-d642c229c3f4
| * likewise r10983zimmerma2016-12-071-4/+2
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10984 280ebfd0-de03-0410-8827-d642c229c3f4
* | Merged r11198-11280 from the trunk; no conflicts but additional changes:vlefevre2017-05-041-23/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * About r11271 (src/add1sp.c), which introduces new special code (function mpfr_add1sp1n), handle MPFR_RNDF in the same way as done in similar existing special code (mpfr_add1sp1 and mpfr_add1sp2). * In mpfr_add1sp3, do the same thing (this should have been done in r11172, where this function was introduced via a merge). * About r11279 (src/sub1sp.c, tests/tsub1sp.c), which introduces new special code (function mpfr_sub1sp1n), do the same thing. In tests/tsub1sp.c, s/RND_LOOP/RND_LOOP_NO_RNDF/ as usual to avoid a failure. * Note: concerning mpfr_sub1sp3, RNDF support was added at the same time of the merge in r11179. * Some style changes related to RNDF, in particular for consistency. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11455 280ebfd0-de03-0410-8827-d642c229c3f4
* | Merged r11179-11196 from the trunk (no conflicts).vlefevre2017-05-041-2/+6
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11453 280ebfd0-de03-0410-8827-d642c229c3f4
* | Merged the latest changes from the trunk and added RNDF supportvlefevre2017-01-101-1/+315
| | | | | | | | | | | | in mpfr_sub1sp3. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11179 280ebfd0-de03-0410-8827-d642c229c3f4
* | Merged the latest changes from the trunk (changing a RND_RAND tovlefevre2017-01-091-4/+5
| | | | | | | | | | | | RND_RAND_NO_RNDF in order to avoid a failure in a test). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11168 280ebfd0-de03-0410-8827-d642c229c3f4
* | Merged the latest changes from the trunk.vlefevre2017-01-011-1/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11121 280ebfd0-de03-0410-8827-d642c229c3f4
* | Merged the latest changes from the trunk.vlefevre2016-12-151-85/+106
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11049 280ebfd0-de03-0410-8827-d642c229c3f4
* | added rounding code for RNDF in special routines for 1 and 2 limbszimmerma2016-12-071-4/+6
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10988 280ebfd0-de03-0410-8827-d642c229c3f4
* | Merged the remaining changesets (concerning src/{add1sp.c,sub1sp.c})vlefevre2016-09-021-28/+228
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | from the trunk, and fixed the code: The old mpfr_add1sp2 function was renamed to mpfr_add1sp_ref in the trunk and a new mpfr_add1sp2 function (with a different purpose) was defined; so, in if (rnd_mode == MPFR_RNDF) return mpfr_add1sp2 (a, b, c, rnd_mode); mpfr_add1sp2 had to be changed to mpfr_sub1sp_ref. Ditto for mpfr_sub1sp2 and mpfr_sub1sp_ref. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10778 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] fixed bug in mpfr_sub1sp2zimmerma2016-07-291-1/+3
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10697 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] another code simplificationzimmerma2016-07-291-15/+1
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10694 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] code simplificationzimmerma2016-07-291-9/+7
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10693 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] faster code for 2 limbs. Results with mbenchzimmerma2016-07-291-3/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (numactl --physcpubind=0 ./mfv5 -p113 mpfr_sub): 3.1.5-dev: mpfr_sub: 36 / 65.33 / 81 4.0-dev: mpfr_sub: 24 / 33.00 / 36 git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10691 280ebfd0-de03-0410-8827-d642c229c3f4
* | Merged r10599 through r10628 from the trunk, resolving the conflictvlefevre2016-07-221-5/+19
|\ \ | |/ | | | | | | | | | | | | | | in tests/tmul.c (i.e. keep code from both the branch and the trunk, corresponding to two independent tests). Some of the later changes in the trunk (src/sqrt.c) are broken with a 32-bit ABI, so let's not merge them for now. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10655 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] implement use of __gmpn_rsblsh_n (disabled for now)zimmerma2016-07-151-3/+11
| | | | | | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10620 280ebfd0-de03-0410-8827-d642c229c3f4
| * [src/sub1sp.c] Clarified comment (it's better not to mention underflowvlefevre2016-07-081-4/+3
| | | | | | | | | | | | before rounding because it is not considered at all in MPFR). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10600 280ebfd0-de03-0410-8827-d642c229c3f4