diff options
Diffstat (limited to 'tools/regression/lib/msun/test-cexp.c')
-rw-r--r-- | tools/regression/lib/msun/test-cexp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/regression/lib/msun/test-cexp.c b/tools/regression/lib/msun/test-cexp.c index 69897d3..6be71ad 100644 --- a/tools/regression/lib/msun/test-cexp.c +++ b/tools/regression/lib/msun/test-cexp.c @@ -31,6 +31,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <sys/param.h> + #include <assert.h> #include <complex.h> #include <fenv.h> @@ -40,8 +42,6 @@ __FBSDID("$FreeBSD$"); #include "test-utils.h" -#define N(i) (sizeof(i) / sizeof((i)[0])) - #pragma STDC FENV_ACCESS ON #pragma STDC CX_LIMITED_RANGE OFF @@ -116,7 +116,7 @@ test_nan() /* cexp(x + NaNi) = NaN + NaNi and optionally raises invalid */ /* cexp(NaN + yi) = NaN + NaNi and optionally raises invalid (|y|>0) */ - for (i = 0; i < N(finites); i++) { + for (i = 0; i < nitems(finites); i++) { printf("# Run %d..\n", i); testall(CMPLXL(finites[i], NAN), CMPLXL(NAN, NAN), ALL_STD_EXCEPT & ~FE_INVALID, 0, 0); @@ -148,7 +148,7 @@ test_inf(void) int i; /* cexp(x + inf i) = NaN + NaNi and raises invalid */ - for (i = 0; i < N(finites); i++) { + for (i = 0; i < nitems(finites); i++) { printf("# Run %d..\n", i); testall(CMPLXL(finites[i], INFINITY), CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 1); @@ -189,7 +189,7 @@ test_reals(void) { int i; - for (i = 0; i < N(finites); i++) { + for (i = 0; i < nitems(finites); i++) { /* XXX could check exceptions more meticulously */ printf("# Run %d..\n", i); test(cexp, CMPLXL(finites[i], 0.0), @@ -212,7 +212,7 @@ test_imaginaries(void) { int i; - for (i = 0; i < N(finites); i++) { + for (i = 0; i < nitems(finites); i++) { printf("# Run %d..\n", i); test(cexp, CMPLXL(0.0, finites[i]), CMPLXL(cos(finites[i]), sin(finites[i])), @@ -244,7 +244,7 @@ test_small(void) double x, y; int i; - for (i = 0; i < N(tests); i += 4) { + for (i = 0; i < nitems(tests); i += 4) { printf("# Run %d..\n", i); a = tests[i]; b = tests[i + 1]; |