X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-roundf1.c;h=159762ee06b8c8bc940adca78645c38d03901373;hb=8df2459e40ab2ee726f4532c0699d4f7a40717d0;hp=0b6bc2f0909720e2581f630b6e38b57c68f88e62;hpb=e220635fc952c63b533873f2af39ec76aed4b4e3;p=gnulib.git diff --git a/tests/test-roundf1.c b/tests/test-roundf1.c index 0b6bc2f09..159762ee0 100644 --- a/tests/test-roundf1.c +++ b/tests/test-roundf1.c @@ -25,7 +25,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #include "nan.h" #define ASSERT(expr) \ @@ -40,12 +40,16 @@ } \ while (0) +/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f. + So we use -zero instead. */ +float zero = 0.0f; + int main () { /* Zero. */ ASSERT (roundf (0.0f) == 0.0f); - ASSERT (roundf (-0.0f) == 0.0f); + ASSERT (roundf (-zero) == 0.0f); /* Positive numbers. */ ASSERT (roundf (0.3f) == 0.0f); ASSERT (roundf (0.5f) == 1.0f);