X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-trunc1.c;h=b9e8a3c88a539febd729017db76940d408cc00ad;hb=4e793c35b62f5ea945b7d33ce36c78fc4d645b3a;hp=0449aa93907c2e5e4c2ca5ed33ec818e46db3a5f;hpb=e220635fc952c63b533873f2af39ec76aed4b4e3;p=gnulib.git diff --git a/tests/test-trunc1.c b/tests/test-trunc1.c index 0449aa939..b9e8a3c88 100644 --- a/tests/test-trunc1.c +++ b/tests/test-trunc1.c @@ -23,7 +23,7 @@ #include #include -#include "isnand.h" +#include "isnand-nolibm.h" #include "nan.h" #define ASSERT(expr) \ @@ -38,12 +38,16 @@ } \ while (0) +/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. + So we use -zero instead. */ +double zero = 0.0; + int main () { /* Zero. */ ASSERT (trunc (0.0) == 0.0); - ASSERT (trunc (-0.0) == 0.0); + ASSERT (trunc (-zero) == 0.0); /* Positive numbers. */ ASSERT (trunc (0.3) == 0.0); ASSERT (trunc (0.7) == 0.0);