diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-10-06 10:01:44 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-10-06 10:01:44 +0000 |
commit | b9e9ebdbc07d09081b69dd91169afdc12eb9ccf7 (patch) | |
tree | 22ae169235b744bc1ab69ee5616719e1b04aabc9 | |
parent | 0af525c9dfc563a696708de5177eb3f77a5bad01 (diff) | |
download | mpfr-2-2-branch.tar.gz |
One of the tests was using the fabs function, but -lm isn't given whenmpfr-2-2-branch
generating the executable, making the linking fail under HP-UX. Fixed
by not using this fabs function. [2.2 branch]
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/mpfr-2-2-branch@3881 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/tpow.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/tpow.c b/tests/tpow.c index 09aeef053..422439474 100644 --- a/tests/tpow.c +++ b/tests/tpow.c @@ -509,6 +509,7 @@ particular_cases (void) for (i = 0; i < 11; i++) for (j = 0; j < 11; j++) { + double d; int p; static int q[11][11] = { /* NaN +inf -inf +0 -0 +1 -1 +2 -2 +0.5 -0.5 */ @@ -527,7 +528,7 @@ particular_cases (void) test_pow (r, t[i], t[j], GMP_RNDN); p = mpfr_nan_p (r) ? 0 : mpfr_inf_p (r) ? 1 : mpfr_cmp_ui (r, 0) == 0 ? 2 : - (int) (fabs (mpfr_get_d (r, GMP_RNDN)) * 128.0); + (d = mpfr_get_d (r, GMP_RNDN), (int) (ABS(d) * 128.0)); if (p != 0 && MPFR_SIGN(r) < 0) p = -p; if (p != q[i][j]) |