[Mpfi-commits] r613 - trunk/mpfi/src

ptheveny at users.gforge.inria.fr ptheveny at users.gforge.inria.fr
Jeu 22 Déc 17:30:33 CET 2011


Author: ptheveny
Date: 2011-12-22 17:30:32 +0100 (Thu, 22 Dec 2011)
New Revision: 613

Modified:
   trunk/mpfi/src/bisect.c
   trunk/mpfi/src/cmp.c
   trunk/mpfi/src/div_ui.c
   trunk/mpfi/src/get_d.c
   trunk/mpfi/src/get_fr.c
   trunk/mpfi/src/is_inside.c
Log:
Remove unused variables.

Modified: trunk/mpfi/src/bisect.c
===================================================================
--- trunk/mpfi/src/bisect.c	2011-12-22 16:30:30 UTC (rev 612)
+++ trunk/mpfi/src/bisect.c	2011-12-22 16:30:32 UTC (rev 613)
@@ -30,7 +30,7 @@
 {
   mp_prec_t prec, prec1, prec2;
   mpfr_t centre;
-  int inexact_centre, dummy;
+  int inexact_centre;
 
   if ( MPFI_NAN_P (y) ) {
     mpfr_set_nan (&(y1->left));
@@ -40,7 +40,7 @@
     MPFR_RET_NAN;
   }
   else if ( !mpfi_bounded_p (y) ) {
-    dummy = mpfi_set (y1, y);
+    mpfi_set (y1, y);
     mpfr_set_nan (&(y2->left));
     mpfr_set_nan (&(y2->right));
     MPFR_RET_NAN;
@@ -57,14 +57,12 @@
 
   inexact_centre = mpfi_mid (centre, y);
 
-  dummy = mpfr_set (&(y1->left), &(y->left), MPFI_RNDD);
-  dummy = mpfr_set (&(y2->right), &(y->right), MPFI_RNDU);
-  dummy = mpfr_set (&(y1->right), centre, MPFI_RNDU); /* FIXME: double
-                                                         rounding
-                                                         error */
-  dummy = mpfr_set (&(y2->left), centre, MPFI_RNDD); /* FIXME: double
-                                                         rounding
-                                                         error */
+  mpfr_set (&(y1->left), &(y->left), MPFI_RNDD);
+  mpfr_set (&(y2->right), &(y->right), MPFI_RNDU);
+  mpfr_set (&(y1->right), centre, MPFI_RNDU); /* FIXME: double rounding
+                                                        error */
+  mpfr_set (&(y2->left), centre, MPFI_RNDD); /* FIXME: double rounding
+                                                       error */
 
   /* do not allow +0 as upper bound. Note that left endpoint of y2
      cannot be -0 because if centre is zero its precision is

Modified: trunk/mpfi/src/cmp.c
===================================================================
--- trunk/mpfi/src/cmp.c	2011-12-22 16:30:30 UTC (rev 612)
+++ trunk/mpfi/src/cmp.c	2011-12-22 16:30:32 UTC (rev 613)
@@ -54,11 +54,11 @@
 int
 mpfi_cmp_d_default (mpfi_srcptr a, const double b)
 {
-  int dummy, res = 0;
+  int res = 0;
   mpfi_t tmp;
 
   mpfi_init2 (tmp, mpfi_get_prec (a));
-  dummy = mpfi_set_d (tmp, b);
+  mpfi_set_d (tmp, b);
   res = mpfi_cmp (a, tmp);
   MPFI_CLEAR (tmp);
 
@@ -68,11 +68,11 @@
 int
 mpfi_cmp_ui_default (mpfi_srcptr a, const unsigned long b)
 {
-  int dummy, res = 0;
+  int res = 0;
   mpfi_t tmp;
 
   mpfi_init2 (tmp, mpfi_get_prec (a));
-  dummy = mpfi_set_ui (tmp, b);
+  mpfi_set_ui (tmp, b);
   res = mpfi_cmp (a, tmp);
   MPFI_CLEAR (tmp);
 
@@ -82,11 +82,11 @@
 int
 mpfi_cmp_si_default (mpfi_srcptr a, const long b)
 {
-  int dummy, res = 0;
+  int res = 0;
   mpfi_t tmp;
 
   mpfi_init2 (tmp, mpfi_get_prec (a));
-  dummy = mpfi_set_si (tmp, b);
+  mpfi_set_si (tmp, b);
   res = mpfi_cmp (a, tmp);
   MPFI_CLEAR (tmp);
 
@@ -96,11 +96,11 @@
 int
 mpfi_cmp_z_default (mpfi_srcptr a, mpz_srcptr b)
 {
-  int dummy, res = 0;
+  int res = 0;
   mpfi_t tmp;
 
   mpfi_init2 (tmp, mpfi_get_prec (a));
-  dummy = mpfi_set_z (tmp, b);
+  mpfi_set_z (tmp, b);
   res = mpfi_cmp (a, tmp);
   MPFI_CLEAR (tmp);
 
@@ -110,11 +110,11 @@
 int
 mpfi_cmp_q_default (mpfi_srcptr a, mpq_srcptr b)
 {
-  int dummy, res = 0;
+  int res = 0;
   mpfi_t tmp;
 
   mpfi_init2 (tmp, mpfi_get_prec (a));
-  dummy = mpfi_set_q (tmp, b);
+  mpfi_set_q (tmp, b);
   res = mpfi_cmp (a, tmp);
   MPFI_CLEAR (tmp);
 
@@ -124,11 +124,11 @@
 int
 mpfi_cmp_fr_default (mpfi_srcptr a, mpfr_srcptr b)
 {
-  int dummy, res = 0;
+  int res = 0;
   mpfi_t tmp;
 
   mpfi_init2 (tmp, mpfi_get_prec (a));
-  dummy = mpfi_set_fr (tmp, b);
+  mpfi_set_fr (tmp, b);
   res = mpfi_cmp (a, tmp);
   MPFI_CLEAR (tmp);
 

Modified: trunk/mpfi/src/div_ui.c
===================================================================
--- trunk/mpfi/src/div_ui.c	2011-12-22 16:30:30 UTC (rev 612)
+++ trunk/mpfi/src/div_ui.c	2011-12-22 16:30:32 UTC (rev 613)
@@ -28,7 +28,6 @@
 int
 mpfi_div_ui (mpfi_ptr a, mpfi_srcptr b, const unsigned long c)
 {
-  mpfr_t tmp;
   int inexact_left, inexact_right, inexact=0;
 
   if (MPFI_NAN_P (b))

Modified: trunk/mpfi/src/get_d.c
===================================================================
--- trunk/mpfi/src/get_d.c	2011-12-22 16:30:30 UTC (rev 612)
+++ trunk/mpfi/src/get_d.c	2011-12-22 16:30:32 UTC (rev 613)
@@ -30,10 +30,9 @@
 {
   double res;
   mpfr_t tmp;
-  int dummy;
 
   mpfr_init2 (tmp, 53); /* Double rounding may occur for subnormal numbers */
-  dummy = mpfi_mid (tmp, a);
+  mpfi_mid (tmp, a);
   res = mpfr_get_d (tmp, GMP_RNDN);
   mpfr_clear (tmp);
 

Modified: trunk/mpfi/src/get_fr.c
===================================================================
--- trunk/mpfi/src/get_fr.c	2011-12-22 16:30:30 UTC (rev 612)
+++ trunk/mpfi/src/get_fr.c	2011-12-22 16:30:32 UTC (rev 613)
@@ -28,6 +28,5 @@
 void
 mpfi_get_fr (mpfr_ptr m, mpfi_srcptr a)
 {
-  int dummy;
-  dummy = mpfi_mid (m, a);
+  mpfi_mid (m, a);
 }

Modified: trunk/mpfi/src/is_inside.c
===================================================================
--- trunk/mpfi/src/is_inside.c	2011-12-22 16:30:30 UTC (rev 612)
+++ trunk/mpfi/src/is_inside.c	2011-12-22 16:30:32 UTC (rev 613)
@@ -46,11 +46,11 @@
 int
 mpfi_is_inside_d (const double a, mpfi_srcptr b)
 {
-  int dummy, res;
+  int res;
   mpfi_t tmp;
 
   mpfi_init2 (tmp, mpfi_get_prec (b));
-  dummy = mpfi_set_d (tmp, a);
+  mpfi_set_d (tmp, a);
   res = mpfi_is_inside (tmp, b);
   MPFI_CLEAR (tmp);
 
@@ -82,11 +82,11 @@
 int
 mpfi_is_inside_z (mpz_srcptr a, mpfi_srcptr b)
 {
-  int dummy, res;
+  int res;
   mpfi_t tmp;
 
   mpfi_init2 (tmp, mpfi_get_prec (b));
-  dummy = mpfi_set_z (tmp, a);
+  mpfi_set_z (tmp, a);
   res = mpfi_is_inside (tmp, b);
   MPFI_CLEAR (tmp);
 
@@ -96,14 +96,14 @@
 int
 mpfi_is_inside_q (mpq_srcptr a, mpfi_srcptr b)
 {
-  int dummy, res;
+  int res;
   mpfi_t tmp;
   /* Returns 0 if one of the operands is a NaN */
   if (MPFI_NAN_P (b))
     return 0;
 
   mpfi_init2 (tmp, mpfi_get_prec (b));
-  dummy = mpfi_set_q (tmp, a);
+  mpfi_set_q (tmp, a);
   res = mpfi_is_inside (tmp, b);
   MPFI_CLEAR (tmp);
 




More information about the Mpfi-commits mailing list