sqrt* tests: More tests.
authorBruno Haible <bruno@clisp.org>
Mon, 5 Mar 2012 01:43:43 +0000 (02:43 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 5 Mar 2012 01:43:43 +0000 (02:43 +0100)
tests/test-sqrt.h

index ffd5af1..2521734 100644 (file)
@@ -35,6 +35,7 @@ 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 (y >= L_(0.0));
       ASSERT (z > - L_(16.0) / TWO_MANT_DIG
               && z < L_(16.0) / TWO_MANT_DIG);
     }