summaryrefslogtreecommitdiff
path: root/add.c
Commit message (Collapse)AuthorAgeFilesLines
* GMP_RNDX -> MPFR_RNDXzimmerma2009-03-031-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6053 280ebfd0-de03-0410-8827-d642c229c3f4
* Update to LGPL v3+, as decided by the main MPFR developers.vlefevre2009-03-031-4/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6050 280ebfd0-de03-0410-8827-d642c229c3f4
* Untabified and deleted trailing spaces (for patches).vlefevre2009-02-271-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6043 280ebfd0-de03-0410-8827-d642c229c3f4
* [add.c] added comment for 0 + 0 with round awayzimmerma2009-02-271-0/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6035 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2009 withvlefevre2009-01-151-1/+1
| | | | | | | perl -pi -e 's/2008 Free Software/2008, 2009 Free Software/' **/*(^/) under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5814 280ebfd0-de03-0410-8827-d642c229c3f4
* This is now GNU MPFR!vlefevre2008-10-271-4/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5654 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2008 withvlefevre2008-01-011-1/+1
| | | | | | | | perl -pi -e 's/2007 Free Software/2007, 2008 Free Software/' **/*(^/) under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5151 280ebfd0-de03-0410-8827-d642c229c3f4
* Added log support for mpfr_add and mpfr_sub.vlefevre2007-03-231-0/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4387 280ebfd0-de03-0410-8827-d642c229c3f4
* Added "Contributed by the Arenaire and Cacao projects, INRIA." to thevlefevre2007-02-071-1/+1
| | | | | | | copyright notices and removed a few old things. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4350 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2007.vlefevre2007-01-101-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4326 280ebfd0-de03-0410-8827-d642c229c3f4
* Fixed FSF address.vlefevre2006-03-311-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4055 280ebfd0-de03-0410-8827-d642c229c3f4
* Added ', Inc.' when missing after 'Free Software Foundation'.vlefevre2006-01-051-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3985 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated the copyright notices according to the new GNU rules on:vlefevre2006-01-051-1/+1
| | | | | | | | | | | http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices i.e. added 2006 to every MPFR file. Note: the copyright notices (currently 336) should match the regexp Copyright.* 2006 Free Software so that it will be easier to update them for the next year... git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3983 280ebfd0-de03-0410-8827-d642c229c3f4
* Removed trailing spaces (better for future patches, as such spacesvlefevre2005-08-181-1/+1
| | | | | | | are sometimes stripped). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3726 280ebfd0-de03-0410-8827-d642c229c3f4
* Converted tabs to spaces with expand.vlefevre2005-08-181-48/+48
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3725 280ebfd0-de03-0410-8827-d642c229c3f4
* Change the address of the FSF.pelissip2005-06-021-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3606 280ebfd0-de03-0410-8827-d642c229c3f4
* Simplify the code.pelissip2004-02-251-1/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2811 280ebfd0-de03-0410-8827-d642c229c3f4
* new coverage testszimmerma2004-02-141-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2714 280ebfd0-de03-0410-8827-d642c229c3f4
* Remove MPFR_ASSERTN(0) and add MPFR_ASSERTD(last condition) instead.pelissip2004-02-121-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2696 280ebfd0-de03-0410-8827-d642c229c3f4
* improved coveragezimmerma2004-02-121-3/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2695 280ebfd0-de03-0410-8827-d642c229c3f4
* + Add mpfr_add1sp which provides addition when all the operands have the ↵pelissip2004-02-121-3/+10
| | | | | | | | | | | | same precision. + Add new test files for mpfr_copysign and mpfr_min and mpfr_max. + Add test for mpfr_exp10 in tests/texp.c + Improve coverage of div_2ui.c and mul_2ui.c + Add a forgotten ASSERT in mpfr_sqrt git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2686 280ebfd0-de03-0410-8827-d642c229c3f4
* + Better support of non IEEE doubles.pelissip2004-02-061-3/+1
| | | | | | | + You can compile MPFR without gmp internal files (ie gmp-impl.h, gmp-mparam.h, and config.h). You only need gmp.h and libgmp.a. But you can still compile with GMP internal files (configure detects them). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2665 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix copyright lines (2004).pelissip2004-01-071-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2603 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix bug of sub1sp.c on sparck.pelissip2004-01-071-2/+2
| | | | | | | | Add new tests for sub1sp. Reenable sub1sp for mpfr_add / mpfr_sub. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2602 280ebfd0-de03-0410-8827-d642c229c3f4
* Disable sub1sp in add.c and in sub.c since it provides some bugs on spark ↵pelissip2003-12-221-2/+2
| | | | | | (Log/acos/asin and atan tests failed but not tsub or tsub1sp). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2592 280ebfd0-de03-0410-8827-d642c229c3f4
* + Add function mpfr_print_mantissa_binary, for debugging reason.pelissip2003-12-091-2/+6
| | | | | | | | | | | | + Rename MPFR_ALLOC_SIZE in MPFR_MALLOC_SIZE. + Add conditionnal -DSMALL directive in mpfr-impl.h. + Add new function: sub1sp. Substraction in case of all the ops have the same prec. + Add its test (tsub1sp). + Modify a few the tests to avoid comparing mpfr results with double, for portability reason. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2569 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix some bugs (Use MPFR_ASSERT(1) instead of MPFR_ASSERT(0))pelissip2003-11-051-1/+1
| | | | | | | Optimize swap.c and copysign.c. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2536 280ebfd0-de03-0410-8827-d642c229c3f4
* Add a real function for mpfr_sgn (not a call to mpfr_cmp_ui_2exp).pelissip2003-11-051-11/+4
| | | | | | | | | | | Add a test for mpfr_sgn. Change the proto of mpfr_add1 and mpfr_sub1 by removing the last arg. Simplify the logic of the sign in mpfr_sub1. Tiny speed up for cmp/set/sqrt. mpfr-impl auto include all the needed local header files (gmp, gmp-impl, mpfr). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2534 280ebfd0-de03-0410-8827-d642c229c3f4
* + Remove MPFR_CLEAR_NAN and MPFR_CLEAR_INF. Only use MPFR_CLEAR_FLAGS.pelissip2003-11-041-11/+7
| | | | | | | | | | | | | | MPFR_SET_INF, MPFR_SET_ZERO and MPFR_SET_ZERO must clear the flags before setting them. + Add a new test in tacosh.c : check Inf / Nan flags. + Use MPFR_IS_SINGULAR in all the remaining files. + Fix the use of MPFR_CLEAR_FLAGS. + mpfr-impl.h auto include gmp.h, gmp-impl.h, mpfr.h and limits.h. + Rename _PROTO to _MPFR_PROTO, and remove _GMP_PROTO. + Add MPFR_INT_SIGN macro. + Encapsulate a few more the sign. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2529 280ebfd0-de03-0410-8827-d642c229c3f4
* Use of MPFR_UNLIKELY and MPFR_IS_SINGULAR for fast detection of special ↵pelissip2003-10-281-47/+48
| | | | | | | | | values (Nan, Inf or Zero). Start to encapsulate the sign to be independant of the reprensation (Must be 1 or -1). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2525 280ebfd0-de03-0410-8827-d642c229c3f4
* Change the internal format of MPFR: ZERO, INF and NAN have special values of ↵pelissip2003-10-271-7/+4
| | | | | | | | | | | | | | exp. Rename MPFR_ESIZE in MPFR_LIMB_SIZE. Rename MPFR_ABSZISE in MPFR_ALLOC_SIZE. Rename MPFR_INIT in MPFR_TMP_INIT (INIT1 too). "mpfr.h" includes <gmp.h> if GMP isn't detected. Change the way of detecting stdio.h (To check). Use mpfr namespace for new definitions in "mpfr.h". git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2524 280ebfd0-de03-0410-8827-d642c229c3f4
* Macros MPFR_EXP_INVALID (invalid exponent value) and MPFR_EXP_CHECKvlefevre2003-05-221-6/+7
| | | | | | | | | | | | added. Code update to use MPFR_GET_EXP and MPFR_SET_EXP instead of MPFR_EXP to allow more bug detection related to special values. Macros MPFR_SET_NAN, MPFR_SET_INF, MPFR_SET_ZERO and MPFR_INIT set the exponent of the number to MPFR_EXP_INVALID if MPFR_EXP_CHECK is defined. Compile with -DMPFR_EXP_CHECK and make check to see the potential problems; currently, 40 of 76 tests fail. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2301 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright line updated.vlefevre2002-05-141-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1930 280ebfd0-de03-0410-8827-d642c229c3f4
* COPYING -> COPYING.LIB and GPL re-added.vlefevre2002-04-151-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1877 280ebfd0-de03-0410-8827-d642c229c3f4
* COPYING.LIB -> COPYING.vlefevre2002-04-051-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1820 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright line changed.vlefevre2002-03-041-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1713 280ebfd0-de03-0410-8827-d642c229c3f4
* Optimization: mpfr_cmp2 now accepts any combination of real argumentsvlefevre2002-01-041-27/+1
| | | | | | | | | and computes the sign of |b| - |c| (in addition to the number of cancelled bits); mpfr_add, mpfr_sub, mpfr_sub1, mpfr_agm and some tests updated to take this change into account. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1641 280ebfd0-de03-0410-8827-d642c229c3f4
* changed Library GPL to Lesser GPLzimmerma2001-11-161-4/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1536 280ebfd0-de03-0410-8827-d642c229c3f4
* add.c -> add.c & add1.cvlefevre2001-11-151-522/+0
| | | | | | | sub.c -> sub.c & sub1.c + some changes. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1490 280ebfd0-de03-0410-8827-d642c229c3f4
* GNU coding style. K&R function headers removed.vlefevre2001-11-101-460/+446
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1488 280ebfd0-de03-0410-8827-d642c229c3f4
* MP_LIMB_T_MAX instead of (mp_limb_t) -1 (a little nicer...).vlefevre2001-11-081-4/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1467 280ebfd0-de03-0410-8827-d642c229c3f4
* Bug fixed.vlefevre2001-11-011-2/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1457 280ebfd0-de03-0410-8827-d642c229c3f4
* Bug fixed.vlefevre2001-10-271-9/+8
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1441 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed pb with exact results not detected (ck was < 0)zimmerma2001-10-261-4/+8
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1406 280ebfd0-de03-0410-8827-d642c229c3f4
* Bug fixed.vlefevre2001-10-251-2/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1380 280ebfd0-de03-0410-8827-d642c229c3f4
* Bug fixed.vlefevre2001-10-251-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1375 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_add1 completely rewritten. Overflows are checked.vlefevre2001-10-251-389/+417
| | | | | | | The ternary value should now be supported (but it hasn't been tested yet). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1366 280ebfd0-de03-0410-8827-d642c229c3f4
* check overflowzimmerma2001-10-251-0/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1356 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug in rounding part when rounding towards 0 (infinite loop due to bn<an)zimmerma2001-10-251-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1347 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_add1 and mpfr_sub1 prototypes moved to mpfr-impl.h (to detect clashes).vlefevre2001-10-191-29/+28
| | | | | | | | Bug fix concerning the inexact ternary value in mpfr_sub. mpfr_add now returns an int (inexact ternary value unsupported if true add). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1309 280ebfd0-de03-0410-8827-d642c229c3f4