summaryrefslogtreecommitdiff
path: root/sub1.c
Commit message (Collapse)AuthorAgeFilesLines
* Renamed COPYING.LIB as COPYING.LESSER (GNU Coding Standards, #7.3)vlefevre2009-07-301-1/+1
| | | | | | and updated all the references (except in ChangeLog). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6351 280ebfd0-de03-0410-8827-d642c229c3f4
* mp_exp_unsigned_t -> mpfr_uexp_t (internal type only).vlefevre2009-06-261-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6297 280ebfd0-de03-0410-8827-d642c229c3f4
* mp_rnd_t -> mpfr_rnd_tvlefevre2009-06-261-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6295 280ebfd0-de03-0410-8827-d642c229c3f4
* GMP_RNDX -> MPFR_RNDXzimmerma2009-03-031-13/+13
| | | | 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
* 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
* sub1.c: fixed types for printf when DEBUG is defined.vlefevre2008-12-261-5/+8
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5782 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 "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
* Partial fix: The inexact flag was not always set in some functions.vlefevre2006-08-201-4/+4
| | | | | | | | | In particular, it is now set by mpfr_check_range (if t is not zero) since mpfr_check_range usually comes just after MPFR_SAVE_EXPO_FREE (which restores the previous flags). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4131 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
* Converted tabs to spaces with expand.vlefevre2005-08-181-2/+2
| | | | 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
* Replace TMP_ALLOC by MPFR_TMP_ALLOCpelissip2005-05-181-9/+9
| | | | | | | | | | Replace TMP_DECL by MPFR_TMP_DECL Replace TMP_MARK by MPFR_TMP_MARK Replace TMP_FREE by MPFR_TMP_FREE Add support for GMP's TMP_SALLOC. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3593 280ebfd0-de03-0410-8827-d642c229c3f4
* Spelling mistakes & reformatted code.vlefevre2005-02-161-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3324 280ebfd0-de03-0410-8827-d642c229c3f4
* Reformatted code.vlefevre2005-02-151-180/+186
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3322 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_set doesn't produce an EVEN inexact flag.pelissip2005-02-151-2/+7
| | | | | | | Fix this. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3318 280ebfd0-de03-0410-8827-d642c229c3f4
* Rename internal functions mpfr_set_overflow in mpfr_overflow andpelissip2005-02-031-2/+2
| | | | | | | | mpfr_set_underflow in mpfr_underflow so that we can add new functions mpfr_set_underflow and mpfr_set_overflow (which set the global flags). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3269 280ebfd0-de03-0410-8827-d642c229c3f4
* Move mpfr_nexttozero and mpfr_nexttoinf from static to mpfr-impl.pelissip2005-02-021-1/+1
| | | | | | | Use them in sub1 and sin. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3260 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix bug of sub1 if dest=src2 and src1 >> src2pelissip2005-02-021-1/+1
| | | | | | | => Fix problem of mpfr_sin git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3255 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix again this previous patch!pelissip2005-01-201-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3195 280ebfd0-de03-0410-8827-d642c229c3f4
* Add commentspelissip2005-01-141-4/+34
| | | | | | | Fix bug in my patch (Need tests). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3191 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix bug in some corner case (Just hope it doesn't add new bugs).pelissip2005-01-141-4/+29
| | | | | | | It should be much faster in these cases too. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3188 280ebfd0-de03-0410-8827-d642c229c3f4
* Reindent the code.pelissip2004-12-201-10/+10
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3155 280ebfd0-de03-0410-8827-d642c229c3f4
* Change from MP_LIMB_T_ONE to MPFR_LIMB_ONE and/or MPFR_LIMB_MASK.pelissip2004-03-261-5/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2858 280ebfd0-de03-0410-8827-d642c229c3f4
* Remove some warnings.pelissip2004-02-241-2/+2
| | | | | | | MPFR can be compiled (but not checked!) with a C++ compiler. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2802 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
* fixed wrong sign of inexact flagzimmerma2004-01-071-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2609 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug (wrong inexact flag) for rounding to nearest when sh=0 andzimmerma2004-01-071-30/+41
| | | | | | | first trailing limbs coincide git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2604 280ebfd0-de03-0410-8827-d642c229c3f4
* + Add function mpfr_print_mantissa_binary, for debugging reason.pelissip2003-12-091-1/+1
| | | | | | | | | | | | + 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
* Optmize a few add1.c/sub1.c by using MPFR_LIKELY / MPFR_UNLIKELY.pelissip2003-11-251-3/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2564 280ebfd0-de03-0410-8827-d642c229c3f4
* Remove some warnings and potential errors (Comparaison between signed and ↵pelissip2003-11-211-2/+2
| | | | | | unsigned). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2563 280ebfd0-de03-0410-8827-d642c229c3f4
* * Optimize a few div.c and mul.c.pelissip2003-11-171-16/+8
| | | | | | | | | | | | | * Reorder the tests. * Remove mpfr_round_raw_generic and create 4 new functions which replace it, for efficiency reasons. * Add round_raw_generic.c which is the generic file to create the 4 new functions. * Add new MACRO: MPFR_RNDUTEST_OR_RNDDNOTTEST which is a faster way to check if (rnd_mode==GMP_RNDU && test) || (rnd_mode==GMP_RNDD && !test). * Add new MACRO: MPFR_UNSIGNED_MINUS_MODULO. * Optimize mpfr_can_round_raw. * Some new defines in mpfr.h to increase compatibility with MPFR v2.0.1 and above. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2550 280ebfd0-de03-0410-8827-d642c229c3f4
* Some minor optimizations.pelissip2003-11-071-11/+19
| | | | | | | | Optimization of mul.c / sub1.c. Some clean up in the header files. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2537 280ebfd0-de03-0410-8827-d642c229c3f4
* Fix some bugs (Use MPFR_ASSERT(1) instead of MPFR_ASSERT(0))pelissip2003-11-051-52/+69
| | | | | | | Optimize swap.c and copysign.c. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2536 280ebfd0-de03-0410-8827-d642c229c3f4
* Optimize mpfr_prec_round.pelissip2003-11-051-3/+2
| | | | | | | | Optimize mpfr_set (Case of both src & dest have the same precision). Start optimizing mpfr_sub1. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2535 280ebfd0-de03-0410-8827-d642c229c3f4
* Add a real function for mpfr_sgn (not a call to mpfr_cmp_ui_2exp).pelissip2003-11-051-9/+18
| | | | | | | | | | | 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
* Added some MPFR_ASSERTN and improved a comment.vlefevre2003-09-221-3/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2430 280ebfd0-de03-0410-8827-d642c229c3f4
* Macros MPFR_EXP_INVALID (invalid exponent value) and MPFR_EXP_CHECKvlefevre2003-05-221-6/+9
| | | | | | | | | | | | 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
* Suppress some #define and fix symbol names (makes code cleaner):vlefevre2002-12-161-3/+3
| | | | | | | | | | | | | | | | | | | perl -pi -e 's/__mpfr_flags/__gmpfr_flags/g' **/*.{c,h} perl -pi -e 's/__mpfr_emin/__gmpfr_emin/g' **/*.{c,h} perl -pi -e 's/__mpfr_emax/__gmpfr_emax/g' **/*.{c,h} perl -pi -e 's/__mpfr_default_fp_bit_precision/__gmpfr_default_fp_bit_precision/g' **/*.{c,h} perl -pi -e 's/__gmp_default_rounding_mode/__gmpfr_default_rounding_mode/g' **/*.{c,h} perl -pi -e 's/__mpfr_const_log2_prec/__gmpfr_const_log2_prec/g' **/*.{c,h} perl -pi -e 's/__mpfr_const_pi_prec/__gmpfr_const_pi_prec/g' **/*.{c,h} perl -pi -e 's/_mpfr_ceil_log2/__gmpfr_ceil_log2/g' **/*.{c,h} perl -pi -e 's/_mpfr_floor_log2/__gmpfr_floor_log2/g' **/*.{c,h} perl -pi -e 's/_mpfr_ceil_exp2/__gmpfr_ceil_exp2/g' **/*.{c,h} perl -pi -e 's/_mpfr_isqrt/__gmpfr_isqrt/g' **/*.{c,h} perl -pi -e 's/_mpfr_cuberoot/__gmpfr_cuberoot/g' **/*.{c,h} perl -pi -e 's/^#define __gmpfr_.*\n//' *.h git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2125 280ebfd0-de03-0410-8827-d642c229c3f4
* MP_LIMB_T_HIGHBIT -> MPFR_LIMB_HIGHBIT.vlefevre2002-06-261-3/+3
| | | | | | | MPFR is now compatible with GMP 4.1. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1955 280ebfd0-de03-0410-8827-d642c229c3f4
* Bug fixed (possible integer overflow).vlefevre2002-05-291-1/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1936 280ebfd0-de03-0410-8827-d642c229c3f4
* Underflow semantics changed (not tested).vlefevre2002-04-231-10/+13
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1910 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