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

ptheveny at users.gforge.inria.fr ptheveny at users.gforge.inria.fr
Ven 25 Juin 14:32:02 CEST 2010


Author: ptheveny
Date: 2010-06-25 14:32:02 +0200 (Fri, 25 Jun 2010)
New Revision: 349

Modified:
   trunk/mpfi/src/has_zero.c
Log:
Optimize mpfi_has_zero.

Modified: trunk/mpfi/src/has_zero.c
===================================================================
--- trunk/mpfi/src/has_zero.c	2010-06-25 12:20:09 UTC (rev 348)
+++ trunk/mpfi/src/has_zero.c	2010-06-25 12:32:02 UTC (rev 349)
@@ -30,7 +30,7 @@
 int
 mpfi_has_zero (mpfi_srcptr a)
 {
-  return (!MPFI_NAN_P (a)
-	  && (mpfr_cmp_ui (&(a->left), 0) <= 0)
-	  && (mpfr_cmp_ui (&(a->right), 0) >= 0) );
+  return (mpfr_cmp_ui (&(a->left), 0) <= 0
+	  && mpfr_cmp_ui (&(a->right), 0) >= 0
+          && !MPFI_NAN_P (a));
 }




More information about the Mpfi-commits mailing list