changeset 16571:8e8c9d0c02cb

sqrt* tests: More tests.
author Bruno Haible <bruno@clisp.org>
date Mon, 05 Mar 2012 02:43:43 +0100
parents 91377475ee5d
children 7f3a9da7d85d
files tests/test-sqrt.h
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-sqrt.h
+++ b/tests/test-sqrt.h
@@ -35,6 +35,7 @@
       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);
     }