summaryrefslogtreecommitdiff
path: root/cmp.c
Commit message (Collapse)AuthorAgeFilesLines
* Add "MPFR_USE_NO_MACRO" user macro: it allows the user to linkpelissip2004-12-141-2/+3
| | | | | | | | | | directly with MPFR functions rather than using Macros to access them. It doesn't define MPFR variable inside mpfr.h too. Fix set.c and cmp.c in consequences. Fix mpf2mpfr.h to use mpfr_get_default_rounding_mode () if needed. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3135 280ebfd0-de03-0410-8827-d642c229c3f4
* cmp(x,y) if x=NAN or y=NAN returns 0 and erange flag.pelissip2004-09-291-2/+7
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3010 280ebfd0-de03-0410-8827-d642c229c3f4
* Add mpfr_cmp as a real function, not only a macro.pelissip2004-04-281-0/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2884 280ebfd0-de03-0410-8827-d642c229c3f4
* improved coverage testzimmerma2004-02-131-4/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2698 280ebfd0-de03-0410-8827-d642c229c3f4
* Add forgotten copyright 2004 line.pelissip2004-02-061-2/+1
| | | | | | | Add a small documentation about mpfr_sum. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2671 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
* Optmize a few add1.c/sub1.c by using MPFR_LIKELY / MPFR_UNLIKELY.pelissip2003-11-251-5/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2564 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
* Use of MPFR_UNLIKELY and MPFR_IS_SINGULAR for fast detection of special ↵pelissip2003-10-281-17/+21
| | | | | | | | | 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
* Macros MPFR_EXP_INVALID (invalid exponent value) and MPFR_EXP_CHECKvlefevre2003-05-221-3/+3
| | | | | | | | | | | | 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
* 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
* 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
* added year 2001 in copyright linezimmerma2001-11-161-1/+1
| | | | | | | removed #if __STDC__ git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1526 280ebfd0-de03-0410-8827-d642c229c3f4
* GNU coding style. K&R function headers removed.vlefevre2001-11-101-13/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1488 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_cmp3 changed and integer overflows checked.vlefevre2001-09-051-50/+55
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1163 280ebfd0-de03-0410-8827-d642c229c3f4
* moved mpfr_cmp2 to separate file cmp2.czimmerma2001-04-031-179/+0
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1045 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed new bug in mpfr_cmp2 found by Fabricezimmerma2001-03-271-19/+32
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1040 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug found by Nathalie Revolzimmerma2001-03-211-19/+32
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1038 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug in mpfr_cmp2 (found on the IA64)zimmerma2001-01-181-1/+4
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@981 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug in mpfr_cmp2 when d=0 and lots of bits matchzimmerma2000-12-221-2/+2
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@932 280ebfd0-de03-0410-8827-d642c229c3f4
* k2r -> ansi stylezimmerma2000-12-211-12/+21
| | | | | | | | removed #include <math.h> by defining auxiliary functions fixed several tiny remaining bugs with NaN/Inf git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@925 280ebfd0-de03-0410-8827-d642c229c3f4
* changed name of mpfr struct fields: _mp_d -> _mpfr_dzimmerma2000-12-181-1/+2
| | | | | | | | | (to detect conflicts with mpf) fixed a few problems in non-STDC headers moved definitions of mpfr-impl.h to mpfr-test.h and created a real mpfr-impl.h git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@897 280ebfd0-de03-0410-8827-d642c229c3f4
* Yet another patch for include files.hanrot2000-12-151-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@863 280ebfd0-de03-0410-8827-d642c229c3f4
* Permutation of includes to avoid warnings due to careless multiple definitionhanrot2000-12-151-1/+1
| | | | | | | of ULONG_MAX. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@862 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug in mpfr_cmp2 when return value is k*BITS_PER_MP_LIMB-1zimmerma2000-12-051-8/+14
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@833 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug in mpfr_cmp3 (when b=0, s not taken into account)zimmerma2000-12-011-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@820 280ebfd0-de03-0410-8827-d642c229c3f4
* changed copyright to Free Software Foundationzimmerma2000-12-011-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@816 280ebfd0-de03-0410-8827-d642c229c3f4
* returned value was one too small in case d=1zimmerma2000-11-281-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@802 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug in mpfr_cmp2: wrong limb considered after cp[cn--] whenzimmerma2000-11-281-8/+10
| | | | | | | cp[cn] was not 111...111 git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@797 280ebfd0-de03-0410-8827-d642c229c3f4
* Infinis, premiere tentative.hanrot2000-11-211-0/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@793 280ebfd0-de03-0410-8827-d642c229c3f4
* protected all macros: xxx -> MPFR_xxxzimmerma2000-10-261-15/+15
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@786 280ebfd0-de03-0410-8827-d642c229c3f4
* replaced mp_bits_per_limb by BITS_PER_MP_LIMB (constant)zimmerma2000-08-161-17/+17
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@701 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed bug found by G. Ballabio for b=0 and 0<c<1zimmerma2000-05-021-1/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@495 280ebfd0-de03-0410-8827-d642c229c3f4
* added cast to mp_limb_t (bug on Alpha in tadd with -O2)zimmerma2000-04-191-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@492 280ebfd0-de03-0410-8827-d642c229c3f4
* SIGN -> MPFR_SIGNzimmerma2000-02-111-3/+3
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@470 280ebfd0-de03-0410-8827-d642c229c3f4
* fixed nasty bug in mpfr_cmp2 (case cc=1)zimmerma1999-12-161-11/+21
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@420 280ebfd0-de03-0410-8827-d642c229c3f4
* mpfr_cmp2(b,c) now returns PREC(b) if b=c, even if c=0zimmerma1999-10-201-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@402 280ebfd0-de03-0410-8827-d642c229c3f4
* added copyright noticezimmerma1999-07-301-9/+26
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@364 280ebfd0-de03-0410-8827-d642c229c3f4
* introduced auxiliary function mpfr_cmp3(x,y,sign) to compare x and sign*yzimmerma1999-07-051-4/+6
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@293 280ebfd0-de03-0410-8827-d642c229c3f4
* Due to the representation of 0 it might have happened that 0 != 0.hanrot1999-07-011-0/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@248 280ebfd0-de03-0410-8827-d642c229c3f4
* Prototypes et quelques causes de warnings corriges.hanrot1999-06-251-2/+16
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@205 280ebfd0-de03-0410-8827-d642c229c3f4
* Correction d'un ABR.hanrot1999-06-251-2/+7
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@168 280ebfd0-de03-0410-8827-d642c229c3f4
* & -> &&zimmerma1999-06-241-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@161 280ebfd0-de03-0410-8827-d642c229c3f4
* added test cn>= in mpfr_cmp2zimmerma1999-06-211-4/+9
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@108 280ebfd0-de03-0410-8827-d642c229c3f4
* Patch in cmp2 for some dirty cases (2^a + 2^b <-> 2^a + z, z << 2^a, b << a)hanrot1999-06-171-60/+102
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@84 280ebfd0-de03-0410-8827-d642c229c3f4
* Initial revisionhanrot1999-06-091-0/+123
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2 280ebfd0-de03-0410-8827-d642c229c3f4