X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-round2.c;h=b5944a94b2bda5b64c8caac41c89e7d6499a92da;hb=17017b2d0c6679ca81452ce96dac91f0de9a1646;hp=b3ae0c80b841541492a478f1e3f7bd7c6cc5c2e7;hpb=b17d7ac7df62c7c7f56fe857ed28151d8b0e4e28;p=gnulib.git diff --git a/tests/test-round2.c b/tests/test-round2.c index b3ae0c80b..b5944a94b 100644 --- a/tests/test-round2.c +++ b/tests/test-round2.c @@ -19,7 +19,7 @@ /* Get the two reference implementations of round under the names round_reference1 and round_reference2. - + round.c will #include for us. */ #define FLOOR_BASED_ROUND round_reference1 #define FLOOR_FREE_ROUND round_reference2 @@ -37,7 +37,7 @@ #ifdef USE_LONG_DOUBLE # error Long double not supported. #elif ! defined USE_FLOAT -# include "isnand.h" +# include "isnand-nolibm.h" # define ISNAN isnand # define FUNCTION "round" # define DOUBLE_UINT uint64_t @@ -45,7 +45,7 @@ # define NUM_HIGHBITS 13 # define NUM_LOWBITS 4 #else /* defined USE_FLOAT */ -# include "isnanf.h" +# include "isnanf-nolibm.h" # define ISNAN isnanf # define FUNCTION "roundf" # define DOUBLE_UINT uint32_t @@ -60,7 +60,7 @@ equal (const char *message, DOUBLE x, DOUBLE y0, DOUBLE y1) { if (ISNAN (y0) ? ISNAN (y1) : y0 == y1) return true; - else + else { fprintf (stderr, "%s: "FUNCTION"(%g(%a)) = %g(%a) or %g(%a)?\n", message, x, x, y0, y0, y1, y1); @@ -75,9 +75,9 @@ check (DOUBLE x) DOUBLE ref1 = round_reference1 (x); DOUBLE ref2 = round_reference2 (x); DOUBLE result = ROUND (x); - + /* If the reference implementations disagree, bail out immediately. */ - if (!equal ("reference implementations disagree", x, ref1, ref2)) + if (!equal ("reference implementations disagree", x, ref1, ref2)) exit (EXIT_FAILURE); /* If the actual implementation is wrong, return an error code. */