install-reloc: Support multi-binary installation.
[gnulib.git] / tests / test-sqrt.h
index ffd5af1..9cb7424 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of sqrt*() function family.
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -34,9 +34,10 @@ test_function (void)
     {
       DOUBLE x = L_(16.0) * RANDOM[i]; /* 0.0 <= x <= 16.0 */
       DOUBLE y = SQRT (x);
-      DOUBLE z = y * y - x;
-      ASSERT (z > - L_(16.0) / TWO_MANT_DIG
-              && z < L_(16.0) / TWO_MANT_DIG);
+      DOUBLE err = y * y - x;
+      ASSERT (y >= L_(0.0));
+      ASSERT (err > - L_(16.0) / TWO_MANT_DIG
+              && err < L_(16.0) / TWO_MANT_DIG);
     }
 
   for (i = 0; i < SIZEOF (RANDOM) / 4; i++)