From 08cc59c1aedd100f1864888ad9d6ef40a6114122 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Fri, 13 Aug 2010 09:41:27 +0000 Subject: [gamma.c] Avoid warning due to -Wunused-but-set-variable (from future GCC 4.6). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7075 280ebfd0-de03-0410-8827-d642c229c3f4 --- gamma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gamma.c b/gamma.c index 32e327e89..f7c1f0aee 100644 --- a/gamma.c +++ b/gamma.c @@ -289,7 +289,7 @@ mpfr_gamma (mpfr_ptr gamma, mpfr_srcptr x, mpfr_rnd_t rnd_mode) mpfr_set_prec (tmp, w); mpfr_set_prec (tmp2, w); ck = mpfr_ui_sub (tmp, 2, x, MPFR_RNDN); - MPFR_ASSERTD (ck == 0); + MPFR_ASSERTD (ck == 0); (void) ck; /* use ck to avoid a warning */ mpfr_const_pi (tmp2, MPFR_RNDN); mpfr_mul (tmp2, tmp2, tmp, MPFR_RNDN); /* Pi*(2-x) */ mpfr_sin (tmp, tmp2, MPFR_RNDN); /* sin(Pi*(2-x)) */ @@ -348,8 +348,8 @@ mpfr_gamma (mpfr_ptr gamma, mpfr_srcptr x, mpfr_rnd_t rnd_mode) /* reflection formula: gamma(x) = Pi*(x-1)/sin(Pi*(2-x))/gamma(2-x) */ - ck = mpfr_ui_sub (xp, 2, x, MPFR_RNDN); - MPFR_ASSERTD(ck == 0); /* 2-x, exact */ + ck = mpfr_ui_sub (xp, 2, x, MPFR_RNDN); /* 2-x, exact */ + MPFR_ASSERTD(ck == 0); (void) ck; /* use ck to avoid a warning */ mpfr_gamma (tmp, xp, MPFR_RNDN); /* gamma(2-x), error (1+u) */ mpfr_const_pi (tmp2, MPFR_RNDN); /* Pi, error (1+u) */ mpfr_mul (GammaTrial, tmp2, xp, MPFR_RNDN); /* Pi*(2-x), error (1+u)^2 */ @@ -362,8 +362,8 @@ mpfr_gamma (mpfr_ptr gamma, mpfr_srcptr x, mpfr_rnd_t rnd_mode) The relative error is thus bounded by |(1+u^2)-1|*g/sin(g) <= |(1+u^2)-1|*2^err_g. <= 2.25*u*2^err_g for |u|<=1/4. With the rounding error, this gives (0.5 + 2.25*2^err_g)*u. */ - ck = mpfr_sub_ui (xp, x, 1, MPFR_RNDN); - MPFR_ASSERTD(ck == 0); /* x-1, exact */ + ck = mpfr_sub_ui (xp, x, 1, MPFR_RNDN); /* x-1, exact */ + MPFR_ASSERTD(ck == 0); (void) ck; /* use ck to avoid a warning */ mpfr_mul (xp, tmp2, xp, MPFR_RNDN); /* Pi*(x-1), error (1+u)^2 */ mpfr_mul (GammaTrial, GammaTrial, tmp, MPFR_RNDN); /* [1 + (0.5 + 2.25*2^err_g)*u]*(1+u)^2 = 1 + (2.5 + 2.25*2^err_g)*u -- cgit v1.2.1