Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libm Remove all cargo-cult #ifndef __vax__ from th...
details: https://anonhg.NetBSD.org/src/rev/e1d5787544d4
branches: trunk
changeset: 327264:e1d5787544d4
user: martin <martin%NetBSD.org@localhost>
date: Mon Mar 03 10:39:08 2014 +0000
description:
Remove all cargo-cult #ifndef __vax__ from the tests, that just paper
over bugs in the vax libm.
diffstat:
tests/lib/libm/t_asin.c | 30 +-------------
tests/lib/libm/t_atan.c | 26 +-----------
tests/lib/libm/t_cbrt.c | 40 +-----------------
tests/lib/libm/t_ceil.c | 94 +------------------------------------------
tests/lib/libm/t_cos.c | 22 +---------
tests/lib/libm/t_cosh.c | 28 +-----------
tests/lib/libm/t_erf.c | 36 +---------------
tests/lib/libm/t_exp.c | 70 +-------------------------------
tests/lib/libm/t_ldexp.c | 28 +-----------
tests/lib/libm/t_log.c | 100 +---------------------------------------------
tests/lib/libm/t_pow.c | 44 +-------------------
tests/lib/libm/t_scalbn.c | 40 +-----------------
tests/lib/libm/t_sin.c | 22 +---------
tests/lib/libm/t_sinh.c | 28 +-----------
tests/lib/libm/t_sqrt.c | 40 +-----------------
tests/lib/libm/t_tan.c | 24 +----------
tests/lib/libm/t_tanh.c | 24 +----------
17 files changed, 28 insertions(+), 668 deletions(-)
diffs (truncated from 4691 to 300 lines):
diff -r fe76abb12766 -r e1d5787544d4 tests/lib/libm/t_asin.c
--- a/tests/lib/libm/t_asin.c Mon Mar 03 10:38:36 2014 +0000
+++ b/tests/lib/libm/t_asin.c Mon Mar 03 10:39:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_asin.c,v 1.2 2013/04/09 12:11:04 isaki Exp $ */
+/* $NetBSD: t_asin.c,v 1.3 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -57,12 +57,10 @@
ATF_TC_BODY(asin_nan, tc)
{
-#ifndef __vax__
const double x = 0.0L / 0.0L;
if (isnan(asin(x)) == 0)
atf_tc_fail_nonfatal("asin(NaN) != NaN");
-#endif
}
ATF_TC(asin_inf_neg);
@@ -73,12 +71,10 @@
ATF_TC_BODY(asin_inf_neg, tc)
{
-#ifndef __vax__
const double x = -1.0L / 0.0L;
if (isnan(asin(x)) == 0)
atf_tc_fail_nonfatal("asin(-Inf) != NaN");
-#endif
}
ATF_TC(asin_inf_pos);
@@ -89,12 +85,10 @@
ATF_TC_BODY(asin_inf_pos, tc)
{
-#ifndef __vax__
const double x = 1.0L / 0.0L;
if (isnan(asin(x)) == 0)
atf_tc_fail_nonfatal("asin(+Inf) != NaN");
-#endif
}
ATF_TC(asin_range);
@@ -105,7 +99,6 @@
ATF_TC_BODY(asin_range, tc)
{
-#ifndef __vax__
const double x[] = { -1.1, -1.000000001, 1.1, 1.000000001 };
size_t i;
@@ -114,7 +107,6 @@
if (isnan(asin(x[i])) == 0)
atf_tc_fail_nonfatal("asin(%f) != NaN", x[i]);
}
-#endif
}
ATF_TC(asin_inrange);
@@ -125,7 +117,6 @@
ATF_TC_BODY(asin_inrange, tc)
{
-#ifndef __vax__
const double eps = 1.0e-15;
double y;
size_t i;
@@ -136,7 +127,6 @@
atf_tc_fail_nonfatal("asin(%g) != %g",
values[i].x, values[i].y);
}
-#endif
}
ATF_TC(asin_zero_neg);
@@ -147,13 +137,11 @@
ATF_TC_BODY(asin_zero_neg, tc)
{
-#ifndef __vax__
const double x = -0.0L;
double y = asin(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("asin(-0.0) != -0.0");
-#endif
}
ATF_TC(asin_zero_pos);
@@ -164,13 +152,11 @@
ATF_TC_BODY(asin_zero_pos, tc)
{
-#ifndef __vax__
const double x = 0.0L;
double y = asin(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("asin(+0.0) != +0.0");
-#endif
}
/*
@@ -184,12 +170,10 @@
ATF_TC_BODY(asinf_nan, tc)
{
-#ifndef __vax__
const float x = 0.0L / 0.0L;
if (isnan(asinf(x)) == 0)
atf_tc_fail_nonfatal("asinf(NaN) != NaN");
-#endif
}
ATF_TC(asinf_inf_neg);
@@ -200,12 +184,10 @@
ATF_TC_BODY(asinf_inf_neg, tc)
{
-#ifndef __vax__
const float x = -1.0L / 0.0L;
if (isnan(asinf(x)) == 0)
atf_tc_fail_nonfatal("asinf(-Inf) != NaN");
-#endif
}
ATF_TC(asinf_inf_pos);
@@ -216,12 +198,10 @@
ATF_TC_BODY(asinf_inf_pos, tc)
{
-#ifndef __vax__
const float x = 1.0L / 0.0L;
if (isnan(asinf(x)) == 0)
atf_tc_fail_nonfatal("asinf(+Inf) != NaN");
-#endif
}
ATF_TC(asinf_range);
@@ -232,7 +212,6 @@
ATF_TC_BODY(asinf_range, tc)
{
-#ifndef __vax__
const float x[] = { -1.1, -1.0000001, 1.1, 1.0000001 };
size_t i;
@@ -241,7 +220,6 @@
if (isnan(asinf(x[i])) == 0)
atf_tc_fail_nonfatal("asinf(%f) != NaN", x[i]);
}
-#endif
}
ATF_TC(asinf_inrange);
@@ -252,7 +230,6 @@
ATF_TC_BODY(asinf_inrange, tc)
{
-#ifndef __vax__
const float eps = 1.0e-6;
float x;
float y;
@@ -264,7 +241,6 @@
if (fabs(asinf(x) - y) > eps)
atf_tc_fail_nonfatal("asinf(%g) != %g", x, y);
}
-#endif
}
ATF_TC(asinf_zero_neg);
@@ -275,13 +251,11 @@
ATF_TC_BODY(asinf_zero_neg, tc)
{
-#ifndef __vax__
const float x = -0.0L;
float y = asinf(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("asinf(-0.0) != -0.0");
-#endif
}
ATF_TC(asinf_zero_pos);
@@ -292,13 +266,11 @@
ATF_TC_BODY(asinf_zero_pos, tc)
{
-#ifndef __vax__
const float x = 0.0L;
float y = asinf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("asinf(+0.0) != +0.0");
-#endif
}
ATF_TP_ADD_TCS(tp)
diff -r fe76abb12766 -r e1d5787544d4 tests/lib/libm/t_atan.c
--- a/tests/lib/libm/t_atan.c Mon Mar 03 10:38:36 2014 +0000
+++ b/tests/lib/libm/t_atan.c Mon Mar 03 10:39:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_atan.c,v 1.10 2014/02/27 17:26:02 joerg Exp $ */
+/* $NetBSD: t_atan.c,v 1.11 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -57,12 +57,10 @@
ATF_TC_BODY(atan_nan, tc)
{
-#ifndef __vax__
const double x = 0.0L / 0.0L;
if (isnan(atan(x)) == 0)
atf_tc_fail_nonfatal("atan(NaN) != NaN");
-#endif
}
ATF_TC(atan_inf_neg);
@@ -73,13 +71,11 @@
ATF_TC_BODY(atan_inf_neg, tc)
{
-#ifndef __vax__
const double x = -1.0L / 0.0L;
const double eps = 1.0e-15;
if (fabs(atan(x) + M_PI_2) > eps)
atf_tc_fail_nonfatal("atan(-Inf) != -pi/2");
-#endif
}
ATF_TC(atan_inf_pos);
@@ -90,13 +86,11 @@
ATF_TC_BODY(atan_inf_pos, tc)
{
-#ifndef __vax__
const double x = +1.0L / 0.0L;
const double eps = 1.0e-15;
if (fabs(atan(x) - M_PI_2) > eps)
atf_tc_fail_nonfatal("atan(+Inf) != pi/2");
-#endif
}
ATF_TC(atan_inrange);
@@ -107,7 +101,6 @@
ATF_TC_BODY(atan_inrange, tc)
{
-#ifndef __vax__
const double eps = 1.0e-15;
size_t i;
@@ -116,7 +109,6 @@
atf_tc_fail_nonfatal("atan(%g) != %g",
values[i].x, values[i].y);
}
-#endif
}
ATF_TC(atan_zero_neg);
@@ -127,13 +119,11 @@
ATF_TC_BODY(atan_zero_neg, tc)
{
-#ifndef __vax__
const double x = -0.0L;
double y = atan(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("atan(-0.0) != -0.0");
-#endif
}
ATF_TC(atan_zero_pos);
@@ -144,13 +134,11 @@
ATF_TC_BODY(atan_zero_pos, tc)
{
-#ifndef __vax__
const double x = 0.0L;
double y = atan(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("atan(+0.0) != +0.0");
-#endif
}
Home |
Main Index |
Thread Index |
Old Index