diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-05-22 21:39:40 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-05-22 21:39:40 +0000 |
commit | 44b4dd94bb98c8d9e7850ae401232bd1b2ea3028 (patch) | |
tree | 9670f0ef8017d42ad2a2062dc08c63c022e450c8 /cmp_si.c | |
parent | 2f3cb289a102043a22bd32c5950db37199fb3fd2 (diff) | |
download | mpfr-44b4dd94bb98c8d9e7850ae401232bd1b2ea3028.tar.gz |
Macros MPFR_EXP_INVALID (invalid exponent value) and MPFR_EXP_CHECK
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
Diffstat (limited to 'cmp_si.c')
-rw-r--r-- | cmp_si.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,7 +1,7 @@ /* mpfr_cmp_si_2exp -- compare a floating-point number with a signed machine integer multiplied by a power of 2 -Copyright 1999, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -60,7 +60,7 @@ mpfr_cmp_si_2exp (mpfr_srcptr b, long int i, mp_exp_t f) /* ai must be representable in a mp_limb_t */ MPFR_ASSERTN(ai == (mp_limb_t) ai); - e = MPFR_EXP(b); /* 2^(e-1) <= b < 2^e */ + e = MPFR_GET_EXP (b); /* 2^(e-1) <= b < 2^e */ if (e <= f) return -si; if (f < MPFR_EMAX_MAX - BITS_PER_MP_LIMB && |