summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/libm-test.c1
-rw-r--r--math/test-fenv.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/math/libm-test.c b/math/libm-test.c
index 982e051bdd..5b773d6bd8 100644
--- a/math/libm-test.c
+++ b/math/libm-test.c
@@ -999,6 +999,7 @@ cbrt_test (void)
check_isinfn ("cbrt (-inf) == -inf", FUNC(cbrt) (minus_infty));
check_isnan ("cbrt (NaN) == NaN", FUNC(cbrt) (nan_value));
#endif
+ check ("cbrt (-0.001) == -0.1", FUNC(cbrt) (-0.001), -0.1);
check_eps ("cbrt (8) == 2", FUNC(cbrt) (8), 2, CHOOSE (5e-17L, 0, 0));
check_eps ("cbrt (-27) == -3", FUNC(cbrt) (-27.0), -3.0,
CHOOSE (3e-16L, 0, 0));
diff --git a/math/test-fenv.c b/math/test-fenv.c
index 2c3aeb07f9..4da2e37dae 100644
--- a/math/test-fenv.c
+++ b/math/test-fenv.c
@@ -228,8 +228,21 @@ fe_tests (void)
static void
feenv_nomask_test (const char *flag_name, int fe_exc)
{
+#if defined FE_NOMASK_ENV
int status;
pid_t pid;
+ fenv_t saved;
+
+ fegetenv (&saved);
+ errno = 0;
+ fesetenv (FE_NOMASK_ENV);
+ status = errno;
+ fesetenv (&saved);
+ if (status == ENOSYS)
+ {
+ printf ("Test: not testing FE_NOMASK_ENV, it isn't implemented.\n");
+ return;
+ }
printf ("Test: after fesetenv (FE_NOMASK_ENV) processes will abort\n");
printf (" when feraiseexcept (%s) is called.\n", flag_name);
@@ -265,6 +278,7 @@ feenv_nomask_test (const char *flag_name, int fe_exc)
++count_errors;
}
}
+#endif
}
/* Test that program doesn't abort with default environment */