This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

math/libm-test.inc


2001-07-16  Andreas Schwab  <schwab@suse.de>

	* math/libm-test.inc (check_float_internal): Fix sign bit test of
	infinities.

Index: math/libm-test.inc
===================================================================
RCS file: /cvs/glibc/libc/math/libm-test.inc,v
retrieving revision 1.39
diff -u -a -u -r1.39 math/libm-test.inc
--- math/libm-test.inc	2001/07/06 04:55:35	1.39
+++ math/libm-test.inc	2001/07/16 19:11:00
@@ -460,8 +460,8 @@
   else if (isinf (computed) && isinf (expected))
     {
       /* Test for sign of infinities.  */
-      if (((exceptions & IGNORE_ZERO_INF_SIGN) == 0)
-	  && (isinf (computed) != isinf (expected)))
+      if ((exceptions & IGNORE_ZERO_INF_SIGN) == 0
+	  && signbit (computed) != signbit (expected))
 	{
 	  ok = 0;
 	  printf ("infinity has wrong sign.\n");
@@ -482,9 +482,9 @@
 	ulp = diff / FUNC(ldexp) (1.0, FUNC(ilogb) (expected) - MANT_DIG);
       set_max_error (ulp, curr_max_error);
       print_diff = 1;
-      if (((exceptions & IGNORE_ZERO_INF_SIGN) == 0)
-	  && (computed == 0.0 && expected == 0.0
-	      && signbit(computed) != signbit (expected)))
+      if ((exceptions & IGNORE_ZERO_INF_SIGN) == 0
+	  && computed == 0.0 && expected == 0.0
+	  && signbit(computed) != signbit (expected))
 	ok = 0;
       else if (ulp == 0.0 || (ulp <= max_ulp && !ignore_max_ulp))
 	ok = 1;

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]