summaryrefslogtreecommitdiffstats
path: root/tools/regression/lib/msun/test-conj.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/regression/lib/msun/test-conj.c')
-rw-r--r--tools/regression/lib/msun/test-conj.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/tools/regression/lib/msun/test-conj.c b/tools/regression/lib/msun/test-conj.c
index 909e810..c261f60 100644
--- a/tools/regression/lib/msun/test-conj.c
+++ b/tools/regression/lib/msun/test-conj.c
@@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$");
#include <math.h>
#include <stdio.h>
+#include "test-utils.h"
+
#pragma STDC CX_LIMITED_RANGE off
/* Make sure gcc doesn't use builtin versions of these or honor __pure2. */
@@ -50,27 +52,6 @@ static float (*libcimagf)(float complex) = cimagf;
static double (*libcimag)(double complex) = cimag;
static long double (*libcimagl)(long double complex) = cimagl;
-/*
- * Compare d1 and d2 using special rules: NaN == NaN and +0 != -0.
- * Fail an assertion if they differ.
- */
-static int
-fpequal(long double d1, long double d2)
-{
-
- if (d1 != d2)
- return (isnan(d1) && isnan(d2));
- return (copysignl(1.0, d1) == copysignl(1.0, d2));
-}
-
-static int
-cfpequal(long double complex d1, long double complex d2)
-{
-
- return (fpequal(creall(d1), creall(d2)) &&
- fpequal(cimagl(d1), cimagl(d2)));
-}
-
static const double tests[] = {
/* a + bI */
0.0, 0.0,
OpenPOWER on IntegriCloud