Remove all cargo-cult #ifndef __vax__ from the tests, that just paper

over bugs in the vax libm.
This commit is contained in:
martin 2014-03-03 10:39:08 +00:00
parent 5e5099dfc8
commit 29ebc6818e
17 changed files with 28 additions and 668 deletions

View File

@ -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_HEAD(asin_nan, tc)
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_HEAD(asin_inf_neg, tc)
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_HEAD(asin_inf_pos, tc)
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_HEAD(asin_range, tc)
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 @@ ATF_TC_BODY(asin_range, tc)
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_HEAD(asin_inrange, tc)
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_BODY(asin_inrange, tc)
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_HEAD(asin_zero_neg, tc)
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_HEAD(asin_zero_pos, tc)
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_HEAD(asinf_nan, tc)
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_HEAD(asinf_inf_neg, tc)
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_HEAD(asinf_inf_pos, tc)
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_HEAD(asinf_range, tc)
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 @@ ATF_TC_BODY(asinf_range, tc)
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_HEAD(asinf_inrange, tc)
ATF_TC_BODY(asinf_inrange, tc)
{
#ifndef __vax__
const float eps = 1.0e-6;
float x;
float y;
@ -264,7 +241,6 @@ ATF_TC_BODY(asinf_inrange, tc)
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_HEAD(asinf_zero_neg, tc)
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_HEAD(asinf_zero_pos, tc)
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)

View File

@ -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_HEAD(atan_nan, tc)
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_HEAD(atan_inf_neg, tc)
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_HEAD(atan_inf_pos, tc)
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_HEAD(atan_inrange, tc)
ATF_TC_BODY(atan_inrange, tc)
{
#ifndef __vax__
const double eps = 1.0e-15;
size_t i;
@ -116,7 +109,6 @@ ATF_TC_BODY(atan_inrange, tc)
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_HEAD(atan_zero_neg, tc)
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_HEAD(atan_zero_pos, tc)
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
}
/*
@ -164,12 +152,10 @@ ATF_TC_HEAD(atanf_nan, tc)
ATF_TC_BODY(atanf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
if (isnan(atanf(x)) == 0)
atf_tc_fail_nonfatal("atanf(NaN) != NaN");
#endif
}
ATF_TC(atanf_inf_neg);
@ -180,13 +166,11 @@ ATF_TC_HEAD(atanf_inf_neg, tc)
ATF_TC_BODY(atanf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
const float eps = 1.0e-7;
if (fabsf(atanf(x) + (float)M_PI_2) > eps)
atf_tc_fail_nonfatal("atanf(-Inf) != -pi/2");
#endif
}
ATF_TC(atanf_inf_pos);
@ -197,13 +181,11 @@ ATF_TC_HEAD(atanf_inf_pos, tc)
ATF_TC_BODY(atanf_inf_pos, tc)
{
#ifndef __vax__
const float x = +1.0L / 0.0L;
const float eps = 1.0e-7;
if (fabsf(atanf(x) - (float)M_PI_2) > eps)
atf_tc_fail_nonfatal("atanf(+Inf) != pi/2");
#endif
}
ATF_TC(atanf_inrange);
@ -214,7 +196,6 @@ ATF_TC_HEAD(atanf_inrange, tc)
ATF_TC_BODY(atanf_inrange, tc)
{
#ifndef __vax__
const float eps = 1.0e-7;
float x;
float y;
@ -226,7 +207,6 @@ ATF_TC_BODY(atanf_inrange, tc)
if (fabs(atanf(x) - y) > eps)
atf_tc_fail_nonfatal("atan(%g) != %g", x, y);
}
#endif
}
ATF_TC(atanf_zero_neg);
@ -237,13 +217,11 @@ ATF_TC_HEAD(atanf_zero_neg, tc)
ATF_TC_BODY(atanf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = atanf(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("atanf(-0.0) != -0.0");
#endif
}
ATF_TC(atanf_zero_pos);
@ -254,13 +232,11 @@ ATF_TC_HEAD(atanf_zero_pos, tc)
ATF_TC_BODY(atanf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = atanf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("atanf(+0.0) != +0.0");
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_cbrt.c,v 1.2 2013/11/19 19:24:33 joerg Exp $ */
/* $NetBSD: t_cbrt.c,v 1.3 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_cbrt.c,v 1.2 2013/11/19 19:24:33 joerg Exp $");
__RCSID("$NetBSD: t_cbrt.c,v 1.3 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <math.h>
@ -46,12 +46,10 @@ ATF_TC_HEAD(cbrt_nan, tc)
ATF_TC_BODY(cbrt_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(cbrt(x)) != 0);
#endif
}
ATF_TC(cbrt_pow);
@ -62,7 +60,6 @@ ATF_TC_HEAD(cbrt_pow, tc)
ATF_TC_BODY(cbrt_pow, tc)
{
#ifndef __vax__
const double x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.0 };
const double eps = 1.0e-14;
double y, z;
@ -77,7 +74,6 @@ ATF_TC_BODY(cbrt_pow, tc)
atf_tc_fail_nonfatal("cbrt(%0.03f) != "
"pow(%0.03f, 1/3)\n", x[i], x[i]);
}
#endif
}
ATF_TC(cbrt_inf_neg);
@ -88,13 +84,11 @@ ATF_TC_HEAD(cbrt_inf_neg, tc)
ATF_TC_BODY(cbrt_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = cbrt(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) != 0);
#endif
}
ATF_TC(cbrt_inf_pos);
@ -105,13 +99,11 @@ ATF_TC_HEAD(cbrt_inf_pos, tc)
ATF_TC_BODY(cbrt_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = cbrt(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(cbrt_zero_neg);
@ -122,13 +114,11 @@ ATF_TC_HEAD(cbrt_zero_neg, tc)
ATF_TC_BODY(cbrt_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = cbrt(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("cbrt(-0.0) != -0.0");
#endif
}
ATF_TC(cbrt_zero_pos);
@ -139,13 +129,11 @@ ATF_TC_HEAD(cbrt_zero_pos, tc)
ATF_TC_BODY(cbrt_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = cbrt(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("cbrt(+0.0) != +0.0");
#endif
}
/*
@ -159,12 +147,10 @@ ATF_TC_HEAD(cbrtf_nan, tc)
ATF_TC_BODY(cbrtf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(cbrtf(x)) != 0);
#endif
}
ATF_TC(cbrtf_powf);
@ -175,7 +161,6 @@ ATF_TC_HEAD(cbrtf_powf, tc)
ATF_TC_BODY(cbrtf_powf, tc)
{
#ifndef __vax__
const float x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.0 };
const float eps = 1.0e-5;
float y, z;
@ -190,7 +175,6 @@ ATF_TC_BODY(cbrtf_powf, tc)
atf_tc_fail_nonfatal("cbrtf(%0.03f) != "
"powf(%0.03f, 1/3)\n", x[i], x[i]);
}
#endif
}
ATF_TC(cbrtf_inf_neg);
@ -201,13 +185,11 @@ ATF_TC_HEAD(cbrtf_inf_neg, tc)
ATF_TC_BODY(cbrtf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = cbrtf(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) != 0);
#endif
}
ATF_TC(cbrtf_inf_pos);
@ -218,13 +200,11 @@ ATF_TC_HEAD(cbrtf_inf_pos, tc)
ATF_TC_BODY(cbrtf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = cbrtf(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(cbrtf_zero_neg);
@ -235,13 +215,11 @@ ATF_TC_HEAD(cbrtf_zero_neg, tc)
ATF_TC_BODY(cbrtf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = cbrtf(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("cbrtf(-0.0) != -0.0");
#endif
}
ATF_TC(cbrtf_zero_pos);
@ -252,13 +230,11 @@ ATF_TC_HEAD(cbrtf_zero_pos, tc)
ATF_TC_BODY(cbrtf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = cbrtf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("cbrtf(+0.0) != +0.0");
#endif
}
/*
@ -272,12 +248,10 @@ ATF_TC_HEAD(cbrtl_nan, tc)
ATF_TC_BODY(cbrtl_nan, tc)
{
#ifndef __vax__
const long double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(cbrtl(x)) != 0);
#endif
}
ATF_TC(cbrtl_powl);
@ -288,7 +262,6 @@ ATF_TC_HEAD(cbrtl_powl, tc)
ATF_TC_BODY(cbrtl_powl, tc)
{
#ifndef __vax__
const long double x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.0 };
const long double eps = 1.0e-15;
long double y, z;
@ -303,7 +276,6 @@ ATF_TC_BODY(cbrtl_powl, tc)
atf_tc_fail_nonfatal("cbrtl(%0.03Lf) != "
"powl(%0.03Lf, 1/3)\n", x[i], x[i]);
}
#endif
}
ATF_TC(cbrtl_inf_neg);
@ -314,13 +286,11 @@ ATF_TC_HEAD(cbrtl_inf_neg, tc)
ATF_TC_BODY(cbrtl_inf_neg, tc)
{
#ifndef __vax__
const long double x = -1.0L / 0.0L;
long double y = cbrtl(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) != 0);
#endif
}
ATF_TC(cbrtl_inf_pos);
@ -331,13 +301,11 @@ ATF_TC_HEAD(cbrtl_inf_pos, tc)
ATF_TC_BODY(cbrtl_inf_pos, tc)
{
#ifndef __vax__
const long double x = 1.0L / 0.0L;
long double y = cbrtl(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(cbrtl_zero_neg);
@ -348,13 +316,11 @@ ATF_TC_HEAD(cbrtl_zero_neg, tc)
ATF_TC_BODY(cbrtl_zero_neg, tc)
{
#ifndef __vax__
const long double x = -0.0L;
long double y = cbrtl(x);
if (fabsl(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("cbrtl(-0.0) != -0.0");
#endif
}
ATF_TC(cbrtl_zero_pos);
@ -365,13 +331,11 @@ ATF_TC_HEAD(cbrtl_zero_pos, tc)
ATF_TC_BODY(cbrtl_zero_pos, tc)
{
#ifndef __vax__
const long double x = 0.0L;
long double y = cbrtl(x);
if (fabsl(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("cbrtl(+0.0) != +0.0");
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_ceil.c,v 1.9 2013/11/13 12:58:11 joerg Exp $ */
/* $NetBSD: t_ceil.c,v 1.10 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_ceil.c,v 1.9 2013/11/13 12:58:11 joerg Exp $");
__RCSID("$NetBSD: t_ceil.c,v 1.10 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <math.h>
@ -68,11 +68,9 @@ ATF_TC_HEAD(ceil_nan, tc)
ATF_TC_BODY(ceil_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(ceil(x)) != 0);
#endif
}
ATF_TC(ceil_inf_neg);
@ -83,13 +81,11 @@ ATF_TC_HEAD(ceil_inf_neg, tc)
ATF_TC_BODY(ceil_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = ceil(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("ceil(-Inf) != -Inf");
#endif
}
ATF_TC(ceil_inf_pos);
@ -100,13 +96,11 @@ ATF_TC_HEAD(ceil_inf_pos, tc)
ATF_TC_BODY(ceil_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = ceil(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("ceil(+Inf) != +Inf");
#endif
}
ATF_TC(ceil_zero_neg);
@ -117,13 +111,11 @@ ATF_TC_HEAD(ceil_zero_neg, tc)
ATF_TC_BODY(ceil_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = ceil(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("ceil(-0.0) != -0.0");
#endif
}
ATF_TC(ceil_zero_pos);
@ -134,13 +126,11 @@ ATF_TC_HEAD(ceil_zero_pos, tc)
ATF_TC_BODY(ceil_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = ceil(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("ceil(+0.0) != +0.0");
#endif
}
/*
@ -169,11 +159,9 @@ ATF_TC_HEAD(ceilf_nan, tc)
ATF_TC_BODY(ceilf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(ceilf(x)) != 0);
#endif
}
ATF_TC(ceilf_inf_neg);
@ -184,13 +172,11 @@ ATF_TC_HEAD(ceilf_inf_neg, tc)
ATF_TC_BODY(ceilf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = ceilf(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("ceilf(-Inf) != -Inf");
#endif
}
ATF_TC(ceilf_inf_pos);
@ -201,13 +187,11 @@ ATF_TC_HEAD(ceilf_inf_pos, tc)
ATF_TC_BODY(ceilf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = ceilf(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("ceilf(+Inf) != +Inf");
#endif
}
ATF_TC(ceilf_zero_neg);
@ -218,13 +202,11 @@ ATF_TC_HEAD(ceilf_zero_neg, tc)
ATF_TC_BODY(ceilf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = ceilf(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("ceilf(-0.0) != -0.0");
#endif
}
ATF_TC(ceilf_zero_pos);
@ -235,13 +217,11 @@ ATF_TC_HEAD(ceilf_zero_pos, tc)
ATF_TC_BODY(ceilf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = ceilf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("ceilf(+0.0) != +0.0");
#endif
}
/*
@ -270,11 +250,9 @@ ATF_TC_HEAD(ceill_nan, tc)
ATF_TC_BODY(ceill_nan, tc)
{
#ifndef __vax__
const long double x = 0.0L / 0.0L;
ATF_CHECK(isnan(ceill(x)) != 0);
#endif
}
ATF_TC(ceill_inf_neg);
@ -285,13 +263,11 @@ ATF_TC_HEAD(ceill_inf_neg, tc)
ATF_TC_BODY(ceill_inf_neg, tc)
{
#ifndef __vax__
const long double x = -1.0L / 0.0L;
long double y = ceill(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("ceill(-Inf) != -Inf");
#endif
}
ATF_TC(ceill_inf_pos);
@ -302,13 +278,11 @@ ATF_TC_HEAD(ceill_inf_pos, tc)
ATF_TC_BODY(ceill_inf_pos, tc)
{
#ifndef __vax__
const long double x = 1.0L / 0.0L;
long double y = ceill(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("ceill(+Inf) != +Inf");
#endif
}
ATF_TC(ceill_zero_neg);
@ -319,13 +293,11 @@ ATF_TC_HEAD(ceill_zero_neg, tc)
ATF_TC_BODY(ceill_zero_neg, tc)
{
#ifndef __vax__
const long double x = -0.0L;
long double y = ceill(x);
if (fabsl(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("ceill(-0.0) != -0.0");
#endif
}
ATF_TC(ceill_zero_pos);
@ -336,13 +308,11 @@ ATF_TC_HEAD(ceill_zero_pos, tc)
ATF_TC_BODY(ceill_zero_pos, tc)
{
#ifndef __vax__
const long double x = 0.0L;
long double y = ceill(x);
if (fabsl(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("ceill(+0.0) != +0.0");
#endif
}
/*
@ -371,11 +341,9 @@ ATF_TC_HEAD(floor_nan, tc)
ATF_TC_BODY(floor_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(floor(x)) != 0);
#endif
}
ATF_TC(floor_inf_neg);
@ -386,13 +354,11 @@ ATF_TC_HEAD(floor_inf_neg, tc)
ATF_TC_BODY(floor_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = floor(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("floor(-Inf) != -Inf");
#endif
}
ATF_TC(floor_inf_pos);
@ -403,13 +369,11 @@ ATF_TC_HEAD(floor_inf_pos, tc)
ATF_TC_BODY(floor_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = floor(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("floor(+Inf) != +Inf");
#endif
}
ATF_TC(floor_zero_neg);
@ -420,13 +384,11 @@ ATF_TC_HEAD(floor_zero_neg, tc)
ATF_TC_BODY(floor_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = floor(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("floor(-0.0) != -0.0");
#endif
}
ATF_TC(floor_zero_pos);
@ -437,13 +399,11 @@ ATF_TC_HEAD(floor_zero_pos, tc)
ATF_TC_BODY(floor_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = floor(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("floor(+0.0) != +0.0");
#endif
}
/*
@ -472,11 +432,9 @@ ATF_TC_HEAD(floorf_nan, tc)
ATF_TC_BODY(floorf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(floorf(x)) != 0);
#endif
}
ATF_TC(floorf_inf_neg);
@ -487,13 +445,11 @@ ATF_TC_HEAD(floorf_inf_neg, tc)
ATF_TC_BODY(floorf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = floorf(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("floorf(-Inf) != -Inf");
#endif
}
ATF_TC(floorf_inf_pos);
@ -504,13 +460,11 @@ ATF_TC_HEAD(floorf_inf_pos, tc)
ATF_TC_BODY(floorf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = floorf(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("floorf(+Inf) != +Inf");
#endif
}
ATF_TC(floorf_zero_neg);
@ -521,13 +475,11 @@ ATF_TC_HEAD(floorf_zero_neg, tc)
ATF_TC_BODY(floorf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = floorf(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("floorf(-0.0) != -0.0");
#endif
}
ATF_TC(floorf_zero_pos);
@ -538,13 +490,11 @@ ATF_TC_HEAD(floorf_zero_pos, tc)
ATF_TC_BODY(floorf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = floorf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("floorf(+0.0) != +0.0");
#endif
}
/*
@ -573,11 +523,9 @@ ATF_TC_HEAD(floorl_nan, tc)
ATF_TC_BODY(floorl_nan, tc)
{
#ifndef __vax__
const long double x = 0.0L / 0.0L;
ATF_CHECK(isnan(floorl(x)) != 0);
#endif
}
ATF_TC(floorl_inf_neg);
@ -588,13 +536,11 @@ ATF_TC_HEAD(floorl_inf_neg, tc)
ATF_TC_BODY(floorl_inf_neg, tc)
{
#ifndef __vax__
const long double x = -1.0L / 0.0L;
long double y = floorl(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("floorl(-Inf) != -Inf");
#endif
}
ATF_TC(floorl_inf_pos);
@ -605,13 +551,11 @@ ATF_TC_HEAD(floorl_inf_pos, tc)
ATF_TC_BODY(floorl_inf_pos, tc)
{
#ifndef __vax__
const long double x = 1.0L / 0.0L;
long double y = floorl(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("floorl(+Inf) != +Inf");
#endif
}
ATF_TC(floorl_zero_neg);
@ -622,13 +566,11 @@ ATF_TC_HEAD(floorl_zero_neg, tc)
ATF_TC_BODY(floorl_zero_neg, tc)
{
#ifndef __vax__
const long double x = -0.0L;
long double y = floorl(x);
if (fabsl(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("floorl(-0.0) != -0.0");
#endif
}
ATF_TC(floorl_zero_pos);
@ -639,13 +581,11 @@ ATF_TC_HEAD(floorl_zero_pos, tc)
ATF_TC_BODY(floorl_zero_pos, tc)
{
#ifndef __vax__
const long double x = 0.0L;
long double y = floorl(x);
if (fabsl(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("floorl(+0.0) != +0.0");
#endif
}
/*
@ -674,11 +614,9 @@ ATF_TC_HEAD(trunc_nan, tc)
ATF_TC_BODY(trunc_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(trunc(x)) != 0);
#endif
}
ATF_TC(trunc_inf_neg);
@ -689,13 +627,11 @@ ATF_TC_HEAD(trunc_inf_neg, tc)
ATF_TC_BODY(trunc_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = trunc(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("trunc(-Inf) != -Inf");
#endif
}
ATF_TC(trunc_inf_pos);
@ -706,13 +642,11 @@ ATF_TC_HEAD(trunc_inf_pos, tc)
ATF_TC_BODY(trunc_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = trunc(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("trunc(+Inf) != +Inf");
#endif
}
ATF_TC(trunc_zero_neg);
@ -723,13 +657,11 @@ ATF_TC_HEAD(trunc_zero_neg, tc)
ATF_TC_BODY(trunc_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = trunc(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("trunc(-0.0) != -0.0");
#endif
}
ATF_TC(trunc_zero_pos);
@ -740,13 +672,11 @@ ATF_TC_HEAD(trunc_zero_pos, tc)
ATF_TC_BODY(trunc_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = trunc(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("trunc(+0.0) != +0.0");
#endif
}
/*
@ -775,11 +705,9 @@ ATF_TC_HEAD(truncf_nan, tc)
ATF_TC_BODY(truncf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(truncf(x)) != 0);
#endif
}
ATF_TC(truncf_inf_neg);
@ -790,13 +718,11 @@ ATF_TC_HEAD(truncf_inf_neg, tc)
ATF_TC_BODY(truncf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = truncf(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("truncf(-Inf) != -Inf");
#endif
}
ATF_TC(truncf_inf_pos);
@ -807,13 +733,11 @@ ATF_TC_HEAD(truncf_inf_pos, tc)
ATF_TC_BODY(truncf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = truncf(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("truncf(+Inf) != +Inf");
#endif
}
ATF_TC(truncf_zero_neg);
@ -824,13 +748,11 @@ ATF_TC_HEAD(truncf_zero_neg, tc)
ATF_TC_BODY(truncf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = truncf(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("truncf(-0.0) != -0.0");
#endif
}
ATF_TC(truncf_zero_pos);
@ -841,13 +763,11 @@ ATF_TC_HEAD(truncf_zero_pos, tc)
ATF_TC_BODY(truncf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = truncf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("truncf(+0.0) != +0.0");
#endif
}
/*
@ -876,11 +796,9 @@ ATF_TC_HEAD(truncl_nan, tc)
ATF_TC_BODY(truncl_nan, tc)
{
#ifndef __vax__
const long double x = 0.0L / 0.0L;
ATF_CHECK(isnan(truncl(x)) != 0);
#endif
}
ATF_TC(truncl_inf_neg);
@ -891,13 +809,11 @@ ATF_TC_HEAD(truncl_inf_neg, tc)
ATF_TC_BODY(truncl_inf_neg, tc)
{
#ifndef __vax__
const long double x = -1.0L / 0.0L;
long double y = truncl(x);
if (isinf(y) == 0 || signbit(y) == 0)
atf_tc_fail_nonfatal("truncl(-Inf) != -Inf");
#endif
}
ATF_TC(truncl_inf_pos);
@ -908,13 +824,11 @@ ATF_TC_HEAD(truncl_inf_pos, tc)
ATF_TC_BODY(truncl_inf_pos, tc)
{
#ifndef __vax__
const long double x = 1.0L / 0.0L;
long double y = truncl(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("truncl(+Inf) != +Inf");
#endif
}
ATF_TC(truncl_zero_neg);
@ -925,13 +839,11 @@ ATF_TC_HEAD(truncl_zero_neg, tc)
ATF_TC_BODY(truncl_zero_neg, tc)
{
#ifndef __vax__
const long double x = -0.0L;
long double y = truncl(x);
if (fabsl(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("truncl(-0.0) != -0.0");
#endif
}
ATF_TC(truncl_zero_pos);
@ -942,13 +854,11 @@ ATF_TC_HEAD(truncl_zero_pos, tc)
ATF_TC_BODY(truncl_zero_pos, tc)
{
#ifndef __vax__
const long double x = 0.0L;
long double y = truncl(x);
if (fabsl(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("truncl(+0.0) != +0.0");
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_cos.c,v 1.3 2011/09/14 13:29:58 jruoho Exp $ */
/* $NetBSD: t_cos.c,v 1.4 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -84,12 +84,10 @@ ATF_TC_HEAD(cos_nan, tc)
ATF_TC_BODY(cos_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(cos(x)) != 0);
#endif
}
ATF_TC(cos_inf_neg);
@ -100,11 +98,9 @@ ATF_TC_HEAD(cos_inf_neg, tc)
ATF_TC_BODY(cos_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
ATF_CHECK(isnan(cos(x)) != 0);
#endif
}
ATF_TC(cos_inf_pos);
@ -115,11 +111,9 @@ ATF_TC_HEAD(cos_inf_pos, tc)
ATF_TC_BODY(cos_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
ATF_CHECK(isnan(cos(x)) != 0);
#endif
}
@ -131,11 +125,9 @@ ATF_TC_HEAD(cos_zero_neg, tc)
ATF_TC_BODY(cos_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
ATF_CHECK(cos(x) == 1.0);
#endif
}
ATF_TC(cos_zero_pos);
@ -146,11 +138,9 @@ ATF_TC_HEAD(cos_zero_pos, tc)
ATF_TC_BODY(cos_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
ATF_CHECK(cos(x) == 1.0);
#endif
}
/*
@ -187,12 +177,10 @@ ATF_TC_HEAD(cosf_nan, tc)
ATF_TC_BODY(cosf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(cosf(x)) != 0);
#endif
}
ATF_TC(cosf_inf_neg);
@ -203,14 +191,12 @@ ATF_TC_HEAD(cosf_inf_neg, tc)
ATF_TC_BODY(cosf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
if (isnan(cosf(x)) == 0) {
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("cosf(-Inf) != NaN");
}
#endif
}
ATF_TC(cosf_inf_pos);
@ -221,14 +207,12 @@ ATF_TC_HEAD(cosf_inf_pos, tc)
ATF_TC_BODY(cosf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
if (isnan(cosf(x)) == 0) {
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("cosf(+Inf) != NaN");
}
#endif
}
@ -240,11 +224,9 @@ ATF_TC_HEAD(cosf_zero_neg, tc)
ATF_TC_BODY(cosf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
ATF_CHECK(cosf(x) == 1.0);
#endif
}
ATF_TC(cosf_zero_pos);
@ -255,11 +237,9 @@ ATF_TC_HEAD(cosf_zero_pos, tc)
ATF_TC_BODY(cosf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
ATF_CHECK(cosf(x) == 1.0);
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_cosh.c,v 1.5 2013/04/09 12:11:04 isaki Exp $ */
/* $NetBSD: t_cosh.c,v 1.6 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_cosh.c,v 1.5 2013/04/09 12:11:04 isaki Exp $");
__RCSID("$NetBSD: t_cosh.c,v 1.6 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <math.h>
@ -64,7 +64,6 @@ ATF_TC_HEAD(cosh_inrange, tc)
ATF_TC_BODY(cosh_inrange, tc)
{
#ifndef __vax__
double eps;
double x;
double y;
@ -78,7 +77,6 @@ ATF_TC_BODY(cosh_inrange, tc)
if (fabs(cosh(x) - y) > eps)
atf_tc_fail_nonfatal("cosh(%g) != %g\n", x, y);
}
#endif
}
ATF_TC(cosh_nan);
@ -89,12 +87,10 @@ ATF_TC_HEAD(cosh_nan, tc)
ATF_TC_BODY(cosh_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(cosh(x)) != 0);
#endif
}
ATF_TC(cosh_inf_neg);
@ -105,13 +101,11 @@ ATF_TC_HEAD(cosh_inf_neg, tc)
ATF_TC_BODY(cosh_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = cosh(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(cosh_inf_pos);
@ -122,13 +116,11 @@ ATF_TC_HEAD(cosh_inf_pos, tc)
ATF_TC_BODY(cosh_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = cosh(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(cosh_zero_neg);
@ -139,12 +131,10 @@ ATF_TC_HEAD(cosh_zero_neg, tc)
ATF_TC_BODY(cosh_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
if (cosh(x) != 1.0)
atf_tc_fail_nonfatal("cosh(-0.0) != 1.0");
#endif
}
ATF_TC(cosh_zero_pos);
@ -155,12 +145,10 @@ ATF_TC_HEAD(cosh_zero_pos, tc)
ATF_TC_BODY(cosh_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
if (cosh(x) != 1.0)
atf_tc_fail_nonfatal("cosh(+0.0) != 1.0");
#endif
}
/*
@ -174,7 +162,6 @@ ATF_TC_HEAD(coshf_inrange, tc)
ATF_TC_BODY(coshf_inrange, tc)
{
#ifndef __vax__
float eps;
float x;
float y;
@ -188,7 +175,6 @@ ATF_TC_BODY(coshf_inrange, tc)
if (fabsf(coshf(x) - y) > eps)
atf_tc_fail_nonfatal("coshf(%g) != %g\n", x, y);
}
#endif
}
ATF_TC(coshf_nan);
@ -199,12 +185,10 @@ ATF_TC_HEAD(coshf_nan, tc)
ATF_TC_BODY(coshf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(coshf(x)) != 0);
#endif
}
ATF_TC(coshf_inf_neg);
@ -215,13 +199,11 @@ ATF_TC_HEAD(coshf_inf_neg, tc)
ATF_TC_BODY(coshf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = coshf(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(coshf_inf_pos);
@ -232,13 +214,11 @@ ATF_TC_HEAD(coshf_inf_pos, tc)
ATF_TC_BODY(coshf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = coshf(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(coshf_zero_neg);
@ -249,12 +229,10 @@ ATF_TC_HEAD(coshf_zero_neg, tc)
ATF_TC_BODY(coshf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
if (coshf(x) != 1.0)
atf_tc_fail_nonfatal("coshf(-0.0) != 1.0");
#endif
}
ATF_TC(coshf_zero_pos);
@ -265,12 +243,10 @@ ATF_TC_HEAD(coshf_zero_pos, tc)
ATF_TC_BODY(coshf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
if (coshf(x) != 1.0)
atf_tc_fail_nonfatal("coshf(+0.0) != 1.0");
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_erf.c,v 1.1 2011/09/17 12:00:50 jruoho Exp $ */
/* $NetBSD: t_erf.c,v 1.2 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_erf.c,v 1.1 2011/09/17 12:00:50 jruoho Exp $");
__RCSID("$NetBSD: t_erf.c,v 1.2 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <math.h>
@ -45,11 +45,9 @@ ATF_TC_HEAD(erf_nan, tc)
ATF_TC_BODY(erf_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(erf(x)) != 0);
#endif
}
ATF_TC(erf_inf_neg);
@ -60,12 +58,10 @@ ATF_TC_HEAD(erf_inf_neg, tc)
ATF_TC_BODY(erf_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
if (erf(x) != -1.0)
atf_tc_fail_nonfatal("erf(-Inf) != -1.0");
#endif
}
ATF_TC(erf_inf_pos);
@ -76,12 +72,10 @@ ATF_TC_HEAD(erf_inf_pos, tc)
ATF_TC_BODY(erf_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
if (erf(x) != 1.0)
atf_tc_fail_nonfatal("erf(+Inf) != 1.0");
#endif
}
ATF_TC(erf_zero_neg);
@ -92,13 +86,11 @@ ATF_TC_HEAD(erf_zero_neg, tc)
ATF_TC_BODY(erf_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = erf(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("erf(-0.0) != -0.0");
#endif
}
ATF_TC(erf_zero_pos);
@ -109,13 +101,11 @@ ATF_TC_HEAD(erf_zero_pos, tc)
ATF_TC_BODY(erf_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = erf(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("erf(+0.0) != +0.0");
#endif
}
/*
@ -129,11 +119,9 @@ ATF_TC_HEAD(erff_nan, tc)
ATF_TC_BODY(erff_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(erff(x)) != 0);
#endif
}
ATF_TC(erff_inf_neg);
@ -144,12 +132,10 @@ ATF_TC_HEAD(erff_inf_neg, tc)
ATF_TC_BODY(erff_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
if (erff(x) != -1.0)
atf_tc_fail_nonfatal("erff(-Inf) != -1.0");
#endif
}
ATF_TC(erff_inf_pos);
@ -160,12 +146,10 @@ ATF_TC_HEAD(erff_inf_pos, tc)
ATF_TC_BODY(erff_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
if (erff(x) != 1.0)
atf_tc_fail_nonfatal("erff(+Inf) != 1.0");
#endif
}
ATF_TC(erff_zero_neg);
@ -176,13 +160,11 @@ ATF_TC_HEAD(erff_zero_neg, tc)
ATF_TC_BODY(erff_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = erff(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("erff(-0.0) != -0.0");
#endif
}
ATF_TC(erff_zero_pos);
@ -193,13 +175,11 @@ ATF_TC_HEAD(erff_zero_pos, tc)
ATF_TC_BODY(erff_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = erff(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("erff(+0.0) != +0.0");
#endif
}
/*
@ -213,11 +193,9 @@ ATF_TC_HEAD(erfc_nan, tc)
ATF_TC_BODY(erfc_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(erfc(x)) != 0);
#endif
}
ATF_TC(erfc_inf_neg);
@ -228,12 +206,10 @@ ATF_TC_HEAD(erfc_inf_neg, tc)
ATF_TC_BODY(erfc_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
if (erfc(x) != 2.0)
atf_tc_fail_nonfatal("erfc(-Inf) != 2.0");
#endif
}
ATF_TC(erfc_inf_pos);
@ -244,13 +220,11 @@ ATF_TC_HEAD(erfc_inf_pos, tc)
ATF_TC_BODY(erfc_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = erfc(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("erfc(+Inf) != +0.0");
#endif
}
/*
@ -264,11 +238,9 @@ ATF_TC_HEAD(erfcf_nan, tc)
ATF_TC_BODY(erfcf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(erfcf(x)) != 0);
#endif
}
ATF_TC(erfcf_inf_neg);
@ -279,12 +251,10 @@ ATF_TC_HEAD(erfcf_inf_neg, tc)
ATF_TC_BODY(erfcf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
if (erfcf(x) != 2.0)
atf_tc_fail_nonfatal("erfcf(-Inf) != 2.0");
#endif
}
ATF_TC(erfcf_inf_pos);
@ -295,13 +265,11 @@ ATF_TC_HEAD(erfcf_inf_pos, tc)
ATF_TC_BODY(erfcf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = erfcf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("erfcf(+Inf) != +0.0");
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_exp.c,v 1.4 2014/02/27 17:26:02 joerg Exp $ */
/* $NetBSD: t_exp.c,v 1.5 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -60,12 +60,10 @@ ATF_TC_HEAD(exp2_nan, tc)
ATF_TC_BODY(exp2_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
if (isnan(exp2(x)) == 0)
atf_tc_fail_nonfatal("exp2(NaN) != NaN");
#endif
}
ATF_TC(exp2_inf_neg);
@ -76,13 +74,11 @@ ATF_TC_HEAD(exp2_inf_neg, tc)
ATF_TC_BODY(exp2_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = exp2(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("exp2(-Inf) != +0.0");
#endif
}
ATF_TC(exp2_inf_pos);
@ -93,13 +89,11 @@ ATF_TC_HEAD(exp2_inf_pos, tc)
ATF_TC_BODY(exp2_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = exp2(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("exp2(+Inf) != +Inf");
#endif
}
ATF_TC(exp2_product);
@ -110,7 +104,6 @@ ATF_TC_HEAD(exp2_product, tc)
ATF_TC_BODY(exp2_product, tc)
{
#ifndef __vax__
const double x[] = { 0.0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8 };
const double y[] = { 8.8, 7.7, 6.6, 5.5, 4.4, 3.3, 2.2, 1.1, 0.0 };
const double eps = 1.0e-11;
@ -122,7 +115,6 @@ ATF_TC_BODY(exp2_product, tc)
atf_tc_fail_nonfatal("exp2(%0.01f + %0.01f) != exp2("
"%0.01f) * exp2(%0.01f)", x[i], y[i], x[i], y[i]);
}
#endif
}
ATF_TC(exp2_zero_neg);
@ -133,12 +125,10 @@ ATF_TC_HEAD(exp2_zero_neg, tc)
ATF_TC_BODY(exp2_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
if (fabs(exp2(x) - 1.0) > 0.0)
atf_tc_fail_nonfatal("exp2(-0.0) != 1.0");
#endif
}
ATF_TC(exp2_zero_pos);
@ -149,12 +139,10 @@ ATF_TC_HEAD(exp2_zero_pos, tc)
ATF_TC_BODY(exp2_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
if (fabs(exp2(x) - 1.0) > 0.0)
atf_tc_fail_nonfatal("exp2(+0.0) != 1.0");
#endif
}
/*
@ -168,12 +156,10 @@ ATF_TC_HEAD(exp2f_nan, tc)
ATF_TC_BODY(exp2f_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
if (isnan(exp2f(x)) == 0)
atf_tc_fail_nonfatal("exp2f(NaN) != NaN");
#endif
}
ATF_TC(exp2f_inf_neg);
@ -184,13 +170,11 @@ ATF_TC_HEAD(exp2f_inf_neg, tc)
ATF_TC_BODY(exp2f_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = exp2f(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("exp2f(-Inf) != +0.0");
#endif
}
ATF_TC(exp2f_inf_pos);
@ -201,13 +185,11 @@ ATF_TC_HEAD(exp2f_inf_pos, tc)
ATF_TC_BODY(exp2f_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = exp2f(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("exp2f(+Inf) != +Inf");
#endif
}
ATF_TC(exp2f_product);
@ -218,7 +200,6 @@ ATF_TC_HEAD(exp2f_product, tc)
ATF_TC_BODY(exp2f_product, tc)
{
#ifndef __vax__
const float x[] = { 0.0, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8 };
const float y[] = { 8.8, 7.7, 6.6, 5.5, 4.4, 3.3, 2.2, 1.1, 0.0 };
const float eps = 1.0e-2;
@ -231,7 +212,6 @@ ATF_TC_BODY(exp2f_product, tc)
atf_tc_fail_nonfatal("exp2f(%0.01f + %0.01f) != exp2f("
"%0.01f) * exp2f(%0.01f)", x[i], y[i], x[i], y[i]);
}
#endif
}
ATF_TC(exp2f_zero_neg);
@ -242,12 +222,10 @@ ATF_TC_HEAD(exp2f_zero_neg, tc)
ATF_TC_BODY(exp2f_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
if (fabsf(exp2f(x) - 1.0f) > 0.0)
atf_tc_fail_nonfatal("exp2f(-0.0) != 1.0");
#endif
}
ATF_TC(exp2f_zero_pos);
@ -258,12 +236,10 @@ ATF_TC_HEAD(exp2f_zero_pos, tc)
ATF_TC_BODY(exp2f_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
if (fabsf(exp2f(x) - 1.0f) > 0.0)
atf_tc_fail_nonfatal("exp2f(+0.0) != 1.0");
#endif
}
/*
@ -277,12 +253,10 @@ ATF_TC_HEAD(exp_nan, tc)
ATF_TC_BODY(exp_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
if (isnan(exp(x)) == 0)
atf_tc_fail_nonfatal("exp(NaN) != NaN");
#endif
}
ATF_TC(exp_inf_neg);
@ -293,13 +267,11 @@ ATF_TC_HEAD(exp_inf_neg, tc)
ATF_TC_BODY(exp_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = exp(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("exp(-Inf) != +0.0");
#endif
}
ATF_TC(exp_inf_pos);
@ -310,13 +282,11 @@ ATF_TC_HEAD(exp_inf_pos, tc)
ATF_TC_BODY(exp_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = exp(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("exp(+Inf) != +Inf");
#endif
}
ATF_TC(exp_product);
@ -327,7 +297,6 @@ ATF_TC_HEAD(exp_product, tc)
ATF_TC_BODY(exp_product, tc)
{
#ifndef __vax__
double eps;
double x;
double y;
@ -341,7 +310,6 @@ ATF_TC_BODY(exp_product, tc)
if (fabs(exp(x) - y) > eps)
atf_tc_fail_nonfatal("exp(%0.01f) != %18.18e", x, y);
}
#endif
}
ATF_TC(exp_zero_neg);
@ -352,12 +320,10 @@ ATF_TC_HEAD(exp_zero_neg, tc)
ATF_TC_BODY(exp_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
if (fabs(exp(x) - 1.0) > 0.0)
atf_tc_fail_nonfatal("exp(-0.0) != 1.0");
#endif
}
ATF_TC(exp_zero_pos);
@ -368,12 +334,10 @@ ATF_TC_HEAD(exp_zero_pos, tc)
ATF_TC_BODY(exp_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
if (fabs(exp(x) - 1.0) > 0.0)
atf_tc_fail_nonfatal("exp(+0.0) != 1.0");
#endif
}
/*
@ -387,12 +351,10 @@ ATF_TC_HEAD(expf_nan, tc)
ATF_TC_BODY(expf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
if (isnan(expf(x)) == 0)
atf_tc_fail_nonfatal("expf(NaN) != NaN");
#endif
}
ATF_TC(expf_inf_neg);
@ -403,13 +365,11 @@ ATF_TC_HEAD(expf_inf_neg, tc)
ATF_TC_BODY(expf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = expf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("expf(-Inf) != +0.0");
#endif
}
ATF_TC(expf_inf_pos);
@ -420,13 +380,11 @@ ATF_TC_HEAD(expf_inf_pos, tc)
ATF_TC_BODY(expf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = expf(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("expf(+Inf) != +Inf");
#endif
}
ATF_TC(expf_product);
@ -437,7 +395,6 @@ ATF_TC_HEAD(expf_product, tc)
ATF_TC_BODY(expf_product, tc)
{
#ifndef __vax__
float eps;
float x;
float y;
@ -451,7 +408,6 @@ ATF_TC_BODY(expf_product, tc)
if (fabsf(expf(x) - y) > eps)
atf_tc_fail_nonfatal("expf(%0.01f) != %18.18e", x, y);
}
#endif
}
ATF_TC(expf_zero_neg);
@ -462,12 +418,10 @@ ATF_TC_HEAD(expf_zero_neg, tc)
ATF_TC_BODY(expf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
if (fabsf(expf(x) - 1.0f) > 0.0)
atf_tc_fail_nonfatal("expf(-0.0) != 1.0");
#endif
}
ATF_TC(expf_zero_pos);
@ -478,12 +432,10 @@ ATF_TC_HEAD(expf_zero_pos, tc)
ATF_TC_BODY(expf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
if (fabsf(expf(x) - 1.0f) > 0.0)
atf_tc_fail_nonfatal("expf(+0.0) != 1.0");
#endif
}
/*
@ -497,12 +449,10 @@ ATF_TC_HEAD(expm1_nan, tc)
ATF_TC_BODY(expm1_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
if (isnan(expm1(x)) == 0)
atf_tc_fail_nonfatal("expm1(NaN) != NaN");
#endif
}
ATF_TC(expm1_inf_neg);
@ -513,12 +463,10 @@ ATF_TC_HEAD(expm1_inf_neg, tc)
ATF_TC_BODY(expm1_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
if (expm1(x) != -1.0)
atf_tc_fail_nonfatal("expm1(-Inf) != -1.0");
#endif
}
ATF_TC(expm1_inf_pos);
@ -529,13 +477,11 @@ ATF_TC_HEAD(expm1_inf_pos, tc)
ATF_TC_BODY(expm1_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = expm1(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("expm1(+Inf) != +Inf");
#endif
}
ATF_TC(expm1_zero_neg);
@ -546,13 +492,11 @@ ATF_TC_HEAD(expm1_zero_neg, tc)
ATF_TC_BODY(expm1_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = expm1(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("expm1(-0.0) != -0.0");
#endif
}
ATF_TC(expm1_zero_pos);
@ -563,13 +507,11 @@ ATF_TC_HEAD(expm1_zero_pos, tc)
ATF_TC_BODY(expm1_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = expm1(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("expm1(+0.0) != +0.0");
#endif
}
/*
@ -583,12 +525,10 @@ ATF_TC_HEAD(expm1f_nan, tc)
ATF_TC_BODY(expm1f_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
if (isnan(expm1f(x)) == 0)
atf_tc_fail_nonfatal("expm1f(NaN) != NaN");
#endif
}
ATF_TC(expm1f_inf_neg);
@ -599,12 +539,10 @@ ATF_TC_HEAD(expm1f_inf_neg, tc)
ATF_TC_BODY(expm1f_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
if (expm1f(x) != -1.0)
atf_tc_fail_nonfatal("expm1f(-Inf) != -1.0");
#endif
}
ATF_TC(expm1f_inf_pos);
@ -615,13 +553,11 @@ ATF_TC_HEAD(expm1f_inf_pos, tc)
ATF_TC_BODY(expm1f_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = expm1f(x);
if (isinf(y) == 0 || signbit(y) != 0)
atf_tc_fail_nonfatal("expm1f(+Inf) != +Inf");
#endif
}
ATF_TC(expm1f_zero_neg);
@ -632,13 +568,11 @@ ATF_TC_HEAD(expm1f_zero_neg, tc)
ATF_TC_BODY(expm1f_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = expm1f(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("expm1f(-0.0) != -0.0");
#endif
}
ATF_TC(expm1f_zero_pos);
@ -649,13 +583,11 @@ ATF_TC_HEAD(expm1f_zero_pos, tc)
ATF_TC_BODY(expm1f_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = expm1f(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("expm1f(+0.0) != +0.0");
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_ldexp.c,v 1.11 2014/02/09 21:26:07 jmmv Exp $ */
/* $NetBSD: t_ldexp.c,v 1.12 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_ldexp.c,v 1.11 2014/02/09 21:26:07 jmmv Exp $");
__RCSID("$NetBSD: t_ldexp.c,v 1.12 2014/03/03 10:39:08 martin Exp $");
#include <sys/param.h>
@ -195,7 +195,6 @@ ATF_TC_HEAD(ldexp_exp2, tc)
ATF_TC_BODY(ldexp_exp2, tc)
{
#ifndef __vax__
const double n[] = { 1, 2, 3, 10, 50, 100 };
const double eps = 1.0e-40;
const double x = 12.0;
@ -211,7 +210,6 @@ ATF_TC_BODY(ldexp_exp2, tc)
"!= %0.01f * exp2(%0.01f)", x, n[i], x, n[i]);
}
}
#endif
}
ATF_TC(ldexp_nan);
@ -222,7 +220,6 @@ ATF_TC_HEAD(ldexp_nan, tc)
ATF_TC_BODY(ldexp_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
double y;
size_t i;
@ -233,7 +230,6 @@ ATF_TC_BODY(ldexp_nan, tc)
y = ldexp(x, exps[i]);
ATF_CHECK(isnan(y) != 0);
}
#endif
}
ATF_TC(ldexp_inf_neg);
@ -244,13 +240,11 @@ ATF_TC_HEAD(ldexp_inf_neg, tc)
ATF_TC_BODY(ldexp_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
size_t i;
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(ldexp(x, exps[i]) == x);
#endif
}
ATF_TC(ldexp_inf_pos);
@ -261,13 +255,11 @@ ATF_TC_HEAD(ldexp_inf_pos, tc)
ATF_TC_BODY(ldexp_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
size_t i;
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(ldexp(x, exps[i]) == x);
#endif
}
ATF_TC(ldexp_zero_neg);
@ -278,7 +270,6 @@ ATF_TC_HEAD(ldexp_zero_neg, tc)
ATF_TC_BODY(ldexp_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y;
size_t i;
@ -290,7 +281,6 @@ ATF_TC_BODY(ldexp_zero_neg, tc)
ATF_CHECK(x == y);
ATF_CHECK(signbit(y) != 0);
}
#endif
}
ATF_TC(ldexp_zero_pos);
@ -301,7 +291,6 @@ ATF_TC_HEAD(ldexp_zero_pos, tc)
ATF_TC_BODY(ldexp_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y;
size_t i;
@ -313,7 +302,6 @@ ATF_TC_BODY(ldexp_zero_pos, tc)
ATF_CHECK(x == y);
ATF_CHECK(signbit(y) == 0);
}
#endif
}
/*
@ -328,7 +316,6 @@ ATF_TC_HEAD(ldexpf_exp2f, tc)
ATF_TC_BODY(ldexpf_exp2f, tc)
{
#ifndef __vax__
const float n[] = { 1, 2, 3, 10, 50, 100 };
const float eps = 1.0e-9;
const float x = 12.0;
@ -344,7 +331,6 @@ ATF_TC_BODY(ldexpf_exp2f, tc)
"!= %0.01f * exp2f(%0.01f)", x, n[i], x, n[i]);
}
}
#endif
}
ATF_TC(ldexpf_nan);
@ -355,7 +341,6 @@ ATF_TC_HEAD(ldexpf_nan, tc)
ATF_TC_BODY(ldexpf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
float y;
size_t i;
@ -366,7 +351,6 @@ ATF_TC_BODY(ldexpf_nan, tc)
y = ldexpf(x, exps[i]);
ATF_CHECK(isnan(y) != 0);
}
#endif
}
ATF_TC(ldexpf_inf_neg);
@ -377,13 +361,11 @@ ATF_TC_HEAD(ldexpf_inf_neg, tc)
ATF_TC_BODY(ldexpf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
size_t i;
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(ldexpf(x, exps[i]) == x);
#endif
}
ATF_TC(ldexpf_inf_pos);
@ -394,13 +376,11 @@ ATF_TC_HEAD(ldexpf_inf_pos, tc)
ATF_TC_BODY(ldexpf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
size_t i;
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(ldexpf(x, exps[i]) == x);
#endif
}
ATF_TC(ldexpf_zero_neg);
@ -411,7 +391,6 @@ ATF_TC_HEAD(ldexpf_zero_neg, tc)
ATF_TC_BODY(ldexpf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y;
size_t i;
@ -423,7 +402,6 @@ ATF_TC_BODY(ldexpf_zero_neg, tc)
ATF_CHECK(x == y);
ATF_CHECK(signbit(y) != 0);
}
#endif
}
ATF_TC(ldexpf_zero_pos);
@ -434,7 +412,6 @@ ATF_TC_HEAD(ldexpf_zero_pos, tc)
ATF_TC_BODY(ldexpf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y;
size_t i;
@ -446,7 +423,6 @@ ATF_TC_BODY(ldexpf_zero_pos, tc)
ATF_CHECK(x == y);
ATF_CHECK(signbit(y) == 0);
}
#endif
}
#define TEST(name, desc) \

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_log.c,v 1.10 2014/02/27 17:26:02 joerg Exp $ */
/* $NetBSD: t_log.c,v 1.11 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_log.c,v 1.10 2014/02/27 17:26:02 joerg Exp $");
__RCSID("$NetBSD: t_log.c,v 1.11 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <atf-c/config.h>
@ -60,12 +60,10 @@ ATF_TC_HEAD(log10_nan, tc)
ATF_TC_BODY(log10_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(log10(x)) != 0);
#endif
}
ATF_TC(log10_inf_neg);
@ -76,12 +74,10 @@ ATF_TC_HEAD(log10_inf_neg, tc)
ATF_TC_BODY(log10_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
const double y = log10(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(log10_inf_pos);
@ -92,11 +88,9 @@ ATF_TC_HEAD(log10_inf_pos, tc)
ATF_TC_BODY(log10_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
ATF_CHECK(log10(x) == x);
#endif
}
ATF_TC(log10_one_pos);
@ -107,14 +101,12 @@ ATF_TC_HEAD(log10_one_pos, tc)
ATF_TC_BODY(log10_one_pos, tc)
{
#ifndef __vax__
const double x = log10(1.0);
const double y = 0.0L;
ATF_CHECK(x == y);
ATF_CHECK(signbit(x) == 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(log10_zero_neg);
@ -125,11 +117,9 @@ ATF_TC_HEAD(log10_zero_neg, tc)
ATF_TC_BODY(log10_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
ATF_CHECK(log10(x) == -HUGE_VAL);
#endif
}
ATF_TC(log10_zero_pos);
@ -140,11 +130,9 @@ ATF_TC_HEAD(log10_zero_pos, tc)
ATF_TC_BODY(log10_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
ATF_CHECK(log10(x) == -HUGE_VAL);
#endif
}
/*
@ -169,12 +157,10 @@ ATF_TC_HEAD(log10f_nan, tc)
ATF_TC_BODY(log10f_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(log10f(x)) != 0);
#endif
}
ATF_TC(log10f_inf_neg);
@ -185,12 +171,10 @@ ATF_TC_HEAD(log10f_inf_neg, tc)
ATF_TC_BODY(log10f_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
const float y = log10f(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(log10f_inf_pos);
@ -201,7 +185,6 @@ ATF_TC_HEAD(log10f_inf_pos, tc)
ATF_TC_BODY(log10f_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
#if defined(__alpha__)
@ -209,7 +192,6 @@ ATF_TC_BODY(log10f_inf_pos, tc)
#endif
ATF_CHECK(log10f(x) == x);
#endif
}
ATF_TC(log10f_one_pos);
@ -220,14 +202,12 @@ ATF_TC_HEAD(log10f_one_pos, tc)
ATF_TC_BODY(log10f_one_pos, tc)
{
#ifndef __vax__
const float x = log10f(1.0);
const float y = 0.0L;
ATF_CHECK(x == y);
ATF_CHECK(signbit(x) == 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(log10f_zero_neg);
@ -238,11 +218,9 @@ ATF_TC_HEAD(log10f_zero_neg, tc)
ATF_TC_BODY(log10f_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
ATF_CHECK(log10f(x) == -HUGE_VALF);
#endif
}
ATF_TC(log10f_zero_pos);
@ -253,11 +231,9 @@ ATF_TC_HEAD(log10f_zero_pos, tc)
ATF_TC_BODY(log10f_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
ATF_CHECK(log10f(x) == -HUGE_VALF);
#endif
}
/*
@ -271,12 +247,10 @@ ATF_TC_HEAD(log1p_nan, tc)
ATF_TC_BODY(log1p_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(log1p(x)) != 0);
#endif
}
ATF_TC(log1p_inf_neg);
@ -287,7 +261,6 @@ ATF_TC_HEAD(log1p_inf_neg, tc)
ATF_TC_BODY(log1p_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
const double y = log1p(x);
@ -295,7 +268,6 @@ ATF_TC_BODY(log1p_inf_neg, tc)
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("log1p(-Inf) != NaN");
}
#endif
}
ATF_TC(log1p_inf_pos);
@ -306,11 +278,9 @@ ATF_TC_HEAD(log1p_inf_pos, tc)
ATF_TC_BODY(log1p_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
ATF_CHECK(log1p(x) == x);
#endif
}
ATF_TC(log1p_one_neg);
@ -321,14 +291,12 @@ ATF_TC_HEAD(log1p_one_neg, tc)
ATF_TC_BODY(log1p_one_neg, tc)
{
#ifndef __vax__
const double x = log1p(-1.0);
if (x != -HUGE_VAL) {
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("log1p(-1.0) != -HUGE_VAL");
}
#endif
}
ATF_TC(log1p_zero_neg);
@ -339,11 +307,9 @@ ATF_TC_HEAD(log1p_zero_neg, tc)
ATF_TC_BODY(log1p_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
ATF_CHECK(log1p(x) == x);
#endif
}
ATF_TC(log1p_zero_pos);
@ -354,11 +320,9 @@ ATF_TC_HEAD(log1p_zero_pos, tc)
ATF_TC_BODY(log1p_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
ATF_CHECK(log1p(x) == x);
#endif
}
/*
@ -372,12 +336,10 @@ ATF_TC_HEAD(log1pf_nan, tc)
ATF_TC_BODY(log1pf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(log1pf(x)) != 0);
#endif
}
ATF_TC(log1pf_inf_neg);
@ -388,7 +350,6 @@ ATF_TC_HEAD(log1pf_inf_neg, tc)
ATF_TC_BODY(log1pf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
const float y = log1pf(x);
@ -396,7 +357,6 @@ ATF_TC_BODY(log1pf_inf_neg, tc)
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("log1pf(-Inf) != NaN");
}
#endif
}
ATF_TC(log1pf_inf_pos);
@ -407,11 +367,9 @@ ATF_TC_HEAD(log1pf_inf_pos, tc)
ATF_TC_BODY(log1pf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
ATF_CHECK(log1pf(x) == x);
#endif
}
ATF_TC(log1pf_one_neg);
@ -422,14 +380,12 @@ ATF_TC_HEAD(log1pf_one_neg, tc)
ATF_TC_BODY(log1pf_one_neg, tc)
{
#ifndef __vax__
const float x = log1pf(-1.0);
if (x != -HUGE_VALF) {
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("log1pf(-1.0) != -HUGE_VALF");
}
#endif
}
ATF_TC(log1pf_zero_neg);
@ -440,11 +396,9 @@ ATF_TC_HEAD(log1pf_zero_neg, tc)
ATF_TC_BODY(log1pf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
ATF_CHECK(log1pf(x) == x);
#endif
}
ATF_TC(log1pf_zero_pos);
@ -455,11 +409,9 @@ ATF_TC_HEAD(log1pf_zero_pos, tc)
ATF_TC_BODY(log1pf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
ATF_CHECK(log1pf(x) == x);
#endif
}
/*
@ -484,12 +436,10 @@ ATF_TC_HEAD(log2_nan, tc)
ATF_TC_BODY(log2_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(log2(x)) != 0);
#endif
}
ATF_TC(log2_inf_neg);
@ -500,12 +450,10 @@ ATF_TC_HEAD(log2_inf_neg, tc)
ATF_TC_BODY(log2_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
const double y = log2(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(log2_inf_pos);
@ -516,11 +464,9 @@ ATF_TC_HEAD(log2_inf_pos, tc)
ATF_TC_BODY(log2_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
ATF_CHECK(log2(x) == x);
#endif
}
ATF_TC(log2_one_pos);
@ -531,14 +477,12 @@ ATF_TC_HEAD(log2_one_pos, tc)
ATF_TC_BODY(log2_one_pos, tc)
{
#ifndef __vax__
const double x = log2(1.0);
const double y = 0.0L;
ATF_CHECK(x == y);
ATF_CHECK(signbit(x) == 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(log2_zero_neg);
@ -549,11 +493,9 @@ ATF_TC_HEAD(log2_zero_neg, tc)
ATF_TC_BODY(log2_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
ATF_CHECK(log2(x) == -HUGE_VAL);
#endif
}
ATF_TC(log2_zero_pos);
@ -564,11 +506,9 @@ ATF_TC_HEAD(log2_zero_pos, tc)
ATF_TC_BODY(log2_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
ATF_CHECK(log2(x) == -HUGE_VAL);
#endif
}
/*
@ -593,12 +533,10 @@ ATF_TC_HEAD(log2f_nan, tc)
ATF_TC_BODY(log2f_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(log2f(x)) != 0);
#endif
}
ATF_TC(log2f_inf_neg);
@ -609,12 +547,10 @@ ATF_TC_HEAD(log2f_inf_neg, tc)
ATF_TC_BODY(log2f_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
const float y = log2f(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(log2f_inf_pos);
@ -625,7 +561,6 @@ ATF_TC_HEAD(log2f_inf_pos, tc)
ATF_TC_BODY(log2f_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
#if defined(__alpha__)
@ -633,7 +568,6 @@ ATF_TC_BODY(log2f_inf_pos, tc)
#endif
ATF_CHECK(log2f(x) == x);
#endif
}
ATF_TC(log2f_one_pos);
@ -644,14 +578,12 @@ ATF_TC_HEAD(log2f_one_pos, tc)
ATF_TC_BODY(log2f_one_pos, tc)
{
#ifndef __vax__
const float x = log2f(1.0);
const float y = 0.0L;
ATF_CHECK(x == y);
ATF_CHECK(signbit(x) == 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(log2f_zero_neg);
@ -662,11 +594,9 @@ ATF_TC_HEAD(log2f_zero_neg, tc)
ATF_TC_BODY(log2f_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
ATF_CHECK(log2f(x) == -HUGE_VALF);
#endif
}
ATF_TC(log2f_zero_pos);
@ -677,11 +607,9 @@ ATF_TC_HEAD(log2f_zero_pos, tc)
ATF_TC_BODY(log2f_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
ATF_CHECK(log2f(x) == -HUGE_VALF);
#endif
}
/*
@ -709,12 +637,10 @@ ATF_TC_HEAD(log_nan, tc)
ATF_TC_BODY(log_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(log(x)) != 0);
#endif
}
ATF_TC(log_inf_neg);
@ -725,12 +651,10 @@ ATF_TC_HEAD(log_inf_neg, tc)
ATF_TC_BODY(log_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
const double y = log(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(log_inf_pos);
@ -741,11 +665,9 @@ ATF_TC_HEAD(log_inf_pos, tc)
ATF_TC_BODY(log_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
ATF_CHECK(log(x) == x);
#endif
}
ATF_TC(log_one_pos);
@ -756,14 +678,12 @@ ATF_TC_HEAD(log_one_pos, tc)
ATF_TC_BODY(log_one_pos, tc)
{
#ifndef __vax__
const double x = log(1.0);
const double y = 0.0L;
ATF_CHECK(x == y);
ATF_CHECK(signbit(x) == 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(log_zero_neg);
@ -774,11 +694,9 @@ ATF_TC_HEAD(log_zero_neg, tc)
ATF_TC_BODY(log_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
ATF_CHECK(log(x) == -HUGE_VAL);
#endif
}
ATF_TC(log_zero_pos);
@ -789,11 +707,9 @@ ATF_TC_HEAD(log_zero_pos, tc)
ATF_TC_BODY(log_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
ATF_CHECK(log(x) == -HUGE_VAL);
#endif
}
/*
@ -821,12 +737,10 @@ ATF_TC_HEAD(logf_nan, tc)
ATF_TC_BODY(logf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(logf(x)) != 0);
#endif
}
ATF_TC(logf_inf_neg);
@ -837,12 +751,10 @@ ATF_TC_HEAD(logf_inf_neg, tc)
ATF_TC_BODY(logf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
const float y = logf(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(logf_inf_pos);
@ -853,7 +765,6 @@ ATF_TC_HEAD(logf_inf_pos, tc)
ATF_TC_BODY(logf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
#if defined(__alpha__)
@ -861,7 +772,6 @@ ATF_TC_BODY(logf_inf_pos, tc)
#endif
ATF_CHECK(logf(x) == x);
#endif
}
ATF_TC(logf_one_pos);
@ -872,14 +782,12 @@ ATF_TC_HEAD(logf_one_pos, tc)
ATF_TC_BODY(logf_one_pos, tc)
{
#ifndef __vax__
const float x = logf(1.0);
const float y = 0.0L;
ATF_CHECK(x == y);
ATF_CHECK(signbit(x) == 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(logf_zero_neg);
@ -890,11 +798,9 @@ ATF_TC_HEAD(logf_zero_neg, tc)
ATF_TC_BODY(logf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
ATF_CHECK(logf(x) == -HUGE_VALF);
#endif
}
ATF_TC(logf_zero_pos);
@ -905,11 +811,9 @@ ATF_TC_HEAD(logf_zero_pos, tc)
ATF_TC_BODY(logf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
ATF_CHECK(logf(x) == -HUGE_VALF);
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_pow.c,v 1.2 2011/09/23 13:48:28 jruoho Exp $ */
/* $NetBSD: t_pow.c,v 1.3 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_pow.c,v 1.2 2011/09/23 13:48:28 jruoho Exp $");
__RCSID("$NetBSD: t_pow.c,v 1.3 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <math.h>
@ -45,11 +45,9 @@ ATF_TC_HEAD(pow_nan_x, tc)
ATF_TC_BODY(pow_nan_x, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(pow(x, 2.0)) != 0);
#endif
}
ATF_TC(pow_nan_y);
@ -60,11 +58,9 @@ ATF_TC_HEAD(pow_nan_y, tc)
ATF_TC_BODY(pow_nan_y, tc)
{
#ifndef __vax__
const double y = 0.0L / 0.0L;
ATF_CHECK(isnan(pow(2.0, y)) != 0);
#endif
}
ATF_TC(pow_inf_neg_x);
@ -75,7 +71,6 @@ ATF_TC_HEAD(pow_inf_neg_x, tc)
ATF_TC_BODY(pow_inf_neg_x, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double z;
@ -106,7 +101,6 @@ ATF_TC_BODY(pow_inf_neg_x, tc)
if (fabs(z) > 0.0 || signbit(z) != 0)
atf_tc_fail_nonfatal("pow(-Inf -4.0) != +0.0");
#endif
}
ATF_TC(pow_inf_neg_y);
@ -117,7 +111,6 @@ ATF_TC_HEAD(pow_inf_neg_y, tc)
ATF_TC_BODY(pow_inf_neg_y, tc)
{
#ifndef __vax__
const double y = -1.0L / 0.0L;
double z;
@ -134,7 +127,6 @@ ATF_TC_BODY(pow_inf_neg_y, tc)
if (fabs(z) > 0.0 || signbit(z) != 0)
atf_tc_fail_nonfatal("pow(1.1, -Inf) != +0.0");
#endif
}
ATF_TC(pow_inf_pos_x);
@ -145,7 +137,6 @@ ATF_TC_HEAD(pow_inf_pos_x, tc)
ATF_TC_BODY(pow_inf_pos_x, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double z;
@ -162,7 +153,6 @@ ATF_TC_BODY(pow_inf_pos_x, tc)
if (isinf(z) == 0 || signbit(z) != 0)
atf_tc_fail_nonfatal("pow(+Inf, 2.0) != +Inf");
#endif
}
ATF_TC(pow_inf_pos_y);
@ -173,7 +163,6 @@ ATF_TC_HEAD(pow_inf_pos_y, tc)
ATF_TC_BODY(pow_inf_pos_y, tc)
{
#ifndef __vax__
const double y = 1.0L / 0.0L;
double z;
@ -190,7 +179,6 @@ ATF_TC_BODY(pow_inf_pos_y, tc)
if (isinf(z) == 0 || signbit(z) != 0)
atf_tc_fail_nonfatal("pow(1.1, +Inf) != +Inf");
#endif
}
ATF_TC(pow_one_neg_x);
@ -201,7 +189,6 @@ ATF_TC_HEAD(pow_one_neg_x, tc)
ATF_TC_BODY(pow_one_neg_x, tc)
{
#ifndef __vax__
const double infp = 1.0L / 0.0L;
const double infn = -1.0L / 0.0L;
@ -220,7 +207,6 @@ ATF_TC_BODY(pow_one_neg_x, tc)
atf_tc_expect_fail("PR lib/45372");
atf_tc_fail_nonfatal("pow(-1.0, -Inf) != 1.0");
}
#endif
}
ATF_TC(pow_one_pos_x);
@ -231,7 +217,6 @@ ATF_TC_HEAD(pow_one_pos_x, tc)
ATF_TC_BODY(pow_one_pos_x, tc)
{
#ifndef __vax__
const double y[] = { 0.0, 0.1, 2.0, -3.0, 99.0, 99.99, 9999999.9 };
const double z = 0.0L / 0.0L;
size_t i;
@ -248,7 +233,6 @@ ATF_TC_BODY(pow_one_pos_x, tc)
if (pow(1.0, y[i]) != 1.0)
atf_tc_fail_nonfatal("pow(1.0, %0.01f) != 1.0", y[i]);
}
#endif
}
ATF_TC(pow_zero_x);
@ -259,7 +243,6 @@ ATF_TC_HEAD(pow_zero_x, tc)
ATF_TC_BODY(pow_zero_x, tc)
{
#ifndef __vax__
double z;
/*
@ -319,7 +302,6 @@ ATF_TC_BODY(pow_zero_x, tc)
if (z != -HUGE_VAL)
atf_tc_fail_nonfatal("pow(-0.0, -5.0) != -HUGE_VAL");
#endif
}
ATF_TC(pow_zero_y);
@ -330,7 +312,6 @@ ATF_TC_HEAD(pow_zero_y, tc)
ATF_TC_BODY(pow_zero_y, tc)
{
#ifndef __vax__
const double x[] = { 0.1, -3.0, 77.0, 99.99, 101.0000001 };
const double z = 0.0L / 0.0L;
size_t i;
@ -353,7 +334,6 @@ ATF_TC_BODY(pow_zero_y, tc)
if (pow(x[i], -0.0) != 1.0)
atf_tc_fail_nonfatal("pow(%0.01f, -0.0) != 1.0", x[i]);
}
#endif
}
/*
@ -367,11 +347,9 @@ ATF_TC_HEAD(powf_nan_x, tc)
ATF_TC_BODY(powf_nan_x, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnanf(powf(x, 2.0)) != 0);
#endif
}
ATF_TC(powf_nan_y);
@ -382,11 +360,9 @@ ATF_TC_HEAD(powf_nan_y, tc)
ATF_TC_BODY(powf_nan_y, tc)
{
#ifndef __vax__
const float y = 0.0L / 0.0L;
ATF_CHECK(isnanf(powf(2.0, y)) != 0);
#endif
}
ATF_TC(powf_inf_neg_x);
@ -397,7 +373,6 @@ ATF_TC_HEAD(powf_inf_neg_x, tc)
ATF_TC_BODY(powf_inf_neg_x, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float z;
@ -430,7 +405,6 @@ ATF_TC_BODY(powf_inf_neg_x, tc)
if (fabsf(z) > 0.0 || signbit(z) != 0)
atf_tc_fail_nonfatal("powf(-Inf -4.0) != +0.0");
#endif
}
ATF_TC(powf_inf_neg_y);
@ -441,7 +415,6 @@ ATF_TC_HEAD(powf_inf_neg_y, tc)
ATF_TC_BODY(powf_inf_neg_y, tc)
{
#ifndef __vax__
const float y = -1.0L / 0.0L;
float z;
@ -458,7 +431,6 @@ ATF_TC_BODY(powf_inf_neg_y, tc)
if (fabsf(z) > 0.0 || signbit(z) != 0)
atf_tc_fail_nonfatal("powf(1.1, -Inf) != +0.0");
#endif
}
ATF_TC(powf_inf_pos_x);
@ -469,7 +441,6 @@ ATF_TC_HEAD(powf_inf_pos_x, tc)
ATF_TC_BODY(powf_inf_pos_x, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float z;
@ -486,7 +457,6 @@ ATF_TC_BODY(powf_inf_pos_x, tc)
if (isinff(z) == 0 || signbit(z) != 0)
atf_tc_fail_nonfatal("powf(+Inf, 2.0) != +Inf");
#endif
}
ATF_TC(powf_inf_pos_y);
@ -497,7 +467,6 @@ ATF_TC_HEAD(powf_inf_pos_y, tc)
ATF_TC_BODY(powf_inf_pos_y, tc)
{
#ifndef __vax__
const float y = 1.0L / 0.0L;
float z;
@ -514,7 +483,6 @@ ATF_TC_BODY(powf_inf_pos_y, tc)
if (isinff(z) == 0 || signbit(z) != 0)
atf_tc_fail_nonfatal("powf(1.1, +Inf) != +Inf");
#endif
}
ATF_TC(powf_one_neg_x);
@ -525,7 +493,6 @@ ATF_TC_HEAD(powf_one_neg_x, tc)
ATF_TC_BODY(powf_one_neg_x, tc)
{
#ifndef __vax__
const float infp = 1.0L / 0.0L;
const float infn = -1.0L / 0.0L;
@ -544,7 +511,6 @@ ATF_TC_BODY(powf_one_neg_x, tc)
atf_tc_expect_fail("PR lib/45372");
atf_tc_fail_nonfatal("powf(-1.0, -Inf) != 1.0");
}
#endif
}
ATF_TC(powf_one_pos_x);
@ -555,7 +521,6 @@ ATF_TC_HEAD(powf_one_pos_x, tc)
ATF_TC_BODY(powf_one_pos_x, tc)
{
#ifndef __vax__
const float y[] = { 0.0, 0.1, 2.0, -3.0, 99.0, 99.99, 9999999.9 };
const float z = 0.0L / 0.0L;
size_t i;
@ -572,7 +537,6 @@ ATF_TC_BODY(powf_one_pos_x, tc)
if (powf(1.0, y[i]) != 1.0)
atf_tc_fail_nonfatal("powf(1.0, %0.01f) != 1.0", y[i]);
}
#endif
}
ATF_TC(powf_zero_x);
@ -583,7 +547,6 @@ ATF_TC_HEAD(powf_zero_x, tc)
ATF_TC_BODY(powf_zero_x, tc)
{
#ifndef __vax__
float z;
/*
@ -643,7 +606,6 @@ ATF_TC_BODY(powf_zero_x, tc)
if (z != -HUGE_VALF)
atf_tc_fail_nonfatal("powf(-0.0, -5.0) != -HUGE_VALF");
#endif
}
ATF_TC(powf_zero_y);
@ -654,7 +616,6 @@ ATF_TC_HEAD(powf_zero_y, tc)
ATF_TC_BODY(powf_zero_y, tc)
{
#ifndef __vax__
const float x[] = { 0.1, -3.0, 77.0, 99.99, 101.0000001 };
const float z = 0.0L / 0.0L;
size_t i;
@ -677,7 +638,6 @@ ATF_TC_BODY(powf_zero_y, tc)
if (powf(x[i], -0.0) != 1.0)
atf_tc_fail_nonfatal("powf(%0.01f, -0.0) != 1.0",x[i]);
}
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_scalbn.c,v 1.10 2013/05/24 11:47:13 martin Exp $ */
/* $NetBSD: t_scalbn.c,v 1.11 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_scalbn.c,v 1.10 2013/05/24 11:47:13 martin Exp $");
__RCSID("$NetBSD: t_scalbn.c,v 1.11 2014/03/03 10:39:08 martin Exp $");
#include <math.h>
#include <limits.h>
@ -99,7 +99,6 @@ ATF_TC_HEAD(scalbn_nan, tc)
ATF_TC_BODY(scalbn_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
double y;
size_t i;
@ -110,7 +109,6 @@ ATF_TC_BODY(scalbn_nan, tc)
y = scalbn(x, exps[i]);
ATF_CHECK(isnan(y) != 0);
}
#endif
}
ATF_TC(scalbn_inf_neg);
@ -121,13 +119,11 @@ ATF_TC_HEAD(scalbn_inf_neg, tc)
ATF_TC_BODY(scalbn_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
size_t i;
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(scalbn(x, exps[i]) == x);
#endif
}
ATF_TC(scalbn_inf_pos);
@ -138,13 +134,11 @@ ATF_TC_HEAD(scalbn_inf_pos, tc)
ATF_TC_BODY(scalbn_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
size_t i;
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(scalbn(x, exps[i]) == x);
#endif
}
ATF_TC(scalbn_ldexp);
@ -155,7 +149,6 @@ ATF_TC_HEAD(scalbn_ldexp, tc)
ATF_TC_BODY(scalbn_ldexp, tc)
{
#ifndef __vax__
#if FLT_RADIX == 2
const double x = 2.91288191221812821;
double y;
@ -168,7 +161,6 @@ ATF_TC_BODY(scalbn_ldexp, tc)
ldexp(x, exps[i]), y - ldexp(x, exps[i]));
}
#endif
#endif
}
ATF_TC(scalbn_zero_neg);
@ -179,7 +171,6 @@ ATF_TC_HEAD(scalbn_zero_neg, tc)
ATF_TC_BODY(scalbn_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y;
size_t i;
@ -191,7 +182,6 @@ ATF_TC_BODY(scalbn_zero_neg, tc)
ATF_CHECK(x == y);
ATF_CHECK(signbit(y) != 0);
}
#endif
}
ATF_TC(scalbn_zero_pos);
@ -202,7 +192,6 @@ ATF_TC_HEAD(scalbn_zero_pos, tc)
ATF_TC_BODY(scalbn_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y;
size_t i;
@ -214,7 +203,6 @@ ATF_TC_BODY(scalbn_zero_pos, tc)
ATF_CHECK(x == y);
ATF_CHECK(signbit(y) == 0);
}
#endif
}
/*
@ -228,7 +216,6 @@ ATF_TC_HEAD(scalbnf_val, tc)
ATF_TC_BODY(scalbnf_val, tc)
{
#ifndef __vax__
const struct testcase *tests = test_vals;
const size_t tcnt = __arraycount(test_vals);
size_t i;
@ -243,7 +230,6 @@ ATF_TC_BODY(scalbnf_val, tc)
"test %zu: return value %g instead of %g (difference %g)",
i, rv, tests[i].result, tests[i].result-rv);
}
#endif
}
ATF_TC(scalbnf_nan);
@ -254,7 +240,6 @@ ATF_TC_HEAD(scalbnf_nan, tc)
ATF_TC_BODY(scalbnf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
float y;
size_t i;
@ -265,7 +250,6 @@ ATF_TC_BODY(scalbnf_nan, tc)
y = scalbnf(x, exps[i]);
ATF_CHECK(isnan(y) != 0);
}
#endif
}
ATF_TC(scalbnf_inf_neg);
@ -276,13 +260,11 @@ ATF_TC_HEAD(scalbnf_inf_neg, tc)
ATF_TC_BODY(scalbnf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
size_t i;
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(scalbnf(x, exps[i]) == x);
#endif
}
ATF_TC(scalbnf_inf_pos);
@ -293,13 +275,11 @@ ATF_TC_HEAD(scalbnf_inf_pos, tc)
ATF_TC_BODY(scalbnf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
size_t i;
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(scalbnf(x, exps[i]) == x);
#endif
}
ATF_TC(scalbnf_ldexpf);
@ -310,7 +290,6 @@ ATF_TC_HEAD(scalbnf_ldexpf, tc)
ATF_TC_BODY(scalbnf_ldexpf, tc)
{
#ifndef __vax__
#if FLT_RADIX == 2
const float x = 2.91288191221812821;
float y;
@ -323,7 +302,6 @@ ATF_TC_BODY(scalbnf_ldexpf, tc)
i, exps[i], y, ldexpf(x, exps[i]), y-ldexpf(x, exps[i]));
}
#endif
#endif
}
ATF_TC(scalbnf_zero_neg);
@ -334,7 +312,6 @@ ATF_TC_HEAD(scalbnf_zero_neg, tc)
ATF_TC_BODY(scalbnf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y;
size_t i;
@ -346,7 +323,6 @@ ATF_TC_BODY(scalbnf_zero_neg, tc)
ATF_CHECK(x == y);
ATF_CHECK(signbit(y) != 0);
}
#endif
}
ATF_TC(scalbnf_zero_pos);
@ -357,7 +333,6 @@ ATF_TC_HEAD(scalbnf_zero_pos, tc)
ATF_TC_BODY(scalbnf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y;
size_t i;
@ -369,7 +344,6 @@ ATF_TC_BODY(scalbnf_zero_pos, tc)
ATF_CHECK(x == y);
ATF_CHECK(signbit(y) == 0);
}
#endif
}
/*
@ -411,7 +385,6 @@ ATF_TC_HEAD(scalbnl_nan, tc)
ATF_TC_BODY(scalbnl_nan, tc)
{
#ifndef __vax__
#ifndef __HAVE_LONG_DOUBLE
atf_tc_skip("Requires long double support");
#else
@ -429,7 +402,6 @@ ATF_TC_BODY(scalbnl_nan, tc)
ATF_CHECK(isnan(y) != 0);
}
#endif
#endif
}
ATF_TC(scalbnl_inf_neg);
@ -440,7 +412,6 @@ ATF_TC_HEAD(scalbnl_inf_neg, tc)
ATF_TC_BODY(scalbnl_inf_neg, tc)
{
#ifndef __vax__
#ifndef __HAVE_LONG_DOUBLE
atf_tc_skip("Requires long double support");
#else
@ -450,7 +421,6 @@ ATF_TC_BODY(scalbnl_inf_neg, tc)
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(scalbnl(x, exps[i]) == x);
#endif
#endif
}
ATF_TC(scalbnl_inf_pos);
@ -461,7 +431,6 @@ ATF_TC_HEAD(scalbnl_inf_pos, tc)
ATF_TC_BODY(scalbnl_inf_pos, tc)
{
#ifndef __vax__
#ifndef __HAVE_LONG_DOUBLE
atf_tc_skip("Requires long double support");
#else
@ -471,7 +440,6 @@ ATF_TC_BODY(scalbnl_inf_pos, tc)
for (i = 0; i < __arraycount(exps); i++)
ATF_CHECK(scalbnl(x, exps[i]) == x);
#endif
#endif
}
ATF_TC(scalbnl_zero_neg);
@ -482,7 +450,6 @@ ATF_TC_HEAD(scalbnl_zero_neg, tc)
ATF_TC_BODY(scalbnl_zero_neg, tc)
{
#ifndef __vax__
#ifndef __HAVE_LONG_DOUBLE
atf_tc_skip("Requires long double support");
#else
@ -498,7 +465,6 @@ ATF_TC_BODY(scalbnl_zero_neg, tc)
ATF_CHECK(signbit(y) != 0);
}
#endif
#endif
}
ATF_TC(scalbnl_zero_pos);
@ -509,7 +475,6 @@ ATF_TC_HEAD(scalbnl_zero_pos, tc)
ATF_TC_BODY(scalbnl_zero_pos, tc)
{
#ifndef __vax__
#ifndef __HAVE_LONG_DOUBLE
atf_tc_skip("Requires long double support");
#else
@ -525,7 +490,6 @@ ATF_TC_BODY(scalbnl_zero_pos, tc)
ATF_CHECK(signbit(y) == 0);
}
#endif
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_sin.c,v 1.3 2011/09/14 13:29:58 jruoho Exp $ */
/* $NetBSD: t_sin.c,v 1.4 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -84,12 +84,10 @@ ATF_TC_HEAD(sin_nan, tc)
ATF_TC_BODY(sin_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(sin(x)) != 0);
#endif
}
ATF_TC(sin_inf_neg);
@ -100,11 +98,9 @@ ATF_TC_HEAD(sin_inf_neg, tc)
ATF_TC_BODY(sin_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
ATF_CHECK(isnan(sin(x)) != 0);
#endif
}
ATF_TC(sin_inf_pos);
@ -115,11 +111,9 @@ ATF_TC_HEAD(sin_inf_pos, tc)
ATF_TC_BODY(sin_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
ATF_CHECK(isnan(sin(x)) != 0);
#endif
}
@ -131,11 +125,9 @@ ATF_TC_HEAD(sin_zero_neg, tc)
ATF_TC_BODY(sin_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
ATF_CHECK(sin(x) == x);
#endif
}
ATF_TC(sin_zero_pos);
@ -146,11 +138,9 @@ ATF_TC_HEAD(sin_zero_pos, tc)
ATF_TC_BODY(sin_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
ATF_CHECK(sin(x) == x);
#endif
}
/*
@ -187,12 +177,10 @@ ATF_TC_HEAD(sinf_nan, tc)
ATF_TC_BODY(sinf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(sinf(x)) != 0);
#endif
}
ATF_TC(sinf_inf_neg);
@ -203,14 +191,12 @@ ATF_TC_HEAD(sinf_inf_neg, tc)
ATF_TC_BODY(sinf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
if (isnan(sinf(x)) == 0) {
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("sinf(-Inf) != NaN");
}
#endif
}
ATF_TC(sinf_inf_pos);
@ -221,14 +207,12 @@ ATF_TC_HEAD(sinf_inf_pos, tc)
ATF_TC_BODY(sinf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
if (isnan(sinf(x)) == 0) {
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("sinf(+Inf) != NaN");
}
#endif
}
@ -240,11 +224,9 @@ ATF_TC_HEAD(sinf_zero_neg, tc)
ATF_TC_BODY(sinf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
ATF_CHECK(sinf(x) == x);
#endif
}
ATF_TC(sinf_zero_pos);
@ -255,11 +237,9 @@ ATF_TC_HEAD(sinf_zero_pos, tc)
ATF_TC_BODY(sinf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
ATF_CHECK(sinf(x) == x);
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_sinh.c,v 1.5 2013/04/09 12:11:04 isaki Exp $ */
/* $NetBSD: t_sinh.c,v 1.6 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_sinh.c,v 1.5 2013/04/09 12:11:04 isaki Exp $");
__RCSID("$NetBSD: t_sinh.c,v 1.6 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <math.h>
@ -63,7 +63,6 @@ ATF_TC_HEAD(sinh_inrange, tc)
ATF_TC_BODY(sinh_inrange, tc)
{
#ifndef __vax__
double eps;
double x;
double y;
@ -77,7 +76,6 @@ ATF_TC_BODY(sinh_inrange, tc)
if (fabs(sinh(x) - y) > eps)
atf_tc_fail_nonfatal("sinh(%g) != %g\n", x, y);
}
#endif
}
ATF_TC(sinh_nan);
@ -88,12 +86,10 @@ ATF_TC_HEAD(sinh_nan, tc)
ATF_TC_BODY(sinh_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(sinh(x)) != 0);
#endif
}
ATF_TC(sinh_inf_neg);
@ -104,13 +100,11 @@ ATF_TC_HEAD(sinh_inf_neg, tc)
ATF_TC_BODY(sinh_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = sinh(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) != 0);
#endif
}
ATF_TC(sinh_inf_pos);
@ -121,13 +115,11 @@ ATF_TC_HEAD(sinh_inf_pos, tc)
ATF_TC_BODY(sinh_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = sinh(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(sinh_zero_neg);
@ -138,13 +130,11 @@ ATF_TC_HEAD(sinh_zero_neg, tc)
ATF_TC_BODY(sinh_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = sinh(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("sinh(-0.0) != -0.0");
#endif
}
ATF_TC(sinh_zero_pos);
@ -155,13 +145,11 @@ ATF_TC_HEAD(sinh_zero_pos, tc)
ATF_TC_BODY(sinh_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = sinh(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("sinh(+0.0) != +0.0");
#endif
}
/*
@ -175,7 +163,6 @@ ATF_TC_HEAD(sinhf_inrange, tc)
ATF_TC_BODY(sinhf_inrange, tc)
{
#ifndef __vax__
float eps;
float x;
float y;
@ -189,7 +176,6 @@ ATF_TC_BODY(sinhf_inrange, tc)
if (fabsf(sinhf(x) - y) > eps)
atf_tc_fail_nonfatal("sinhf(%g) != %g\n", x, y);
}
#endif
}
ATF_TC(sinhf_nan);
@ -200,12 +186,10 @@ ATF_TC_HEAD(sinhf_nan, tc)
ATF_TC_BODY(sinhf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(sinhf(x)) != 0);
#endif
}
ATF_TC(sinhf_inf_neg);
@ -216,13 +200,11 @@ ATF_TC_HEAD(sinhf_inf_neg, tc)
ATF_TC_BODY(sinhf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = sinhf(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) != 0);
#endif
}
ATF_TC(sinhf_inf_pos);
@ -233,13 +215,11 @@ ATF_TC_HEAD(sinhf_inf_pos, tc)
ATF_TC_BODY(sinhf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = sinhf(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(sinhf_zero_neg);
@ -250,13 +230,11 @@ ATF_TC_HEAD(sinhf_zero_neg, tc)
ATF_TC_BODY(sinhf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = sinhf(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("sinhf(-0.0) != -0.0");
#endif
}
ATF_TC(sinhf_zero_pos);
@ -267,13 +245,11 @@ ATF_TC_HEAD(sinhf_zero_pos, tc)
ATF_TC_BODY(sinhf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = sinhf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("sinhf(+0.0) != +0.0");
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_sqrt.c,v 1.5 2013/11/22 17:19:14 martin Exp $ */
/* $NetBSD: t_sqrt.c,v 1.6 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_sqrt.c,v 1.5 2013/11/22 17:19:14 martin Exp $");
__RCSID("$NetBSD: t_sqrt.c,v 1.6 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <math.h>
@ -47,12 +47,10 @@ ATF_TC_HEAD(sqrt_nan, tc)
ATF_TC_BODY(sqrt_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(sqrt(x)) != 0);
#endif
}
ATF_TC(sqrt_pow);
@ -63,7 +61,6 @@ ATF_TC_HEAD(sqrt_pow, tc)
ATF_TC_BODY(sqrt_pow, tc)
{
#ifndef __vax__
const double x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.9999 };
const double eps = 1.0e-40;
double y, z;
@ -78,7 +75,6 @@ ATF_TC_BODY(sqrt_pow, tc)
atf_tc_fail_nonfatal("sqrt(%0.03f) != "
"pow(%0.03f, 1/2)\n", x[i], x[i]);
}
#endif
}
ATF_TC(sqrt_inf_neg);
@ -89,12 +85,10 @@ ATF_TC_HEAD(sqrt_inf_neg, tc)
ATF_TC_BODY(sqrt_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
double y = sqrt(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(sqrt_inf_pos);
@ -105,13 +99,11 @@ ATF_TC_HEAD(sqrt_inf_pos, tc)
ATF_TC_BODY(sqrt_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
double y = sqrt(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(sqrt_zero_neg);
@ -122,13 +114,11 @@ ATF_TC_HEAD(sqrt_zero_neg, tc)
ATF_TC_BODY(sqrt_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = sqrt(x);
if (fabs(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("sqrt(-0.0) != -0.0");
#endif
}
ATF_TC(sqrt_zero_pos);
@ -139,13 +129,11 @@ ATF_TC_HEAD(sqrt_zero_pos, tc)
ATF_TC_BODY(sqrt_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = sqrt(x);
if (fabs(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("sqrt(+0.0) != +0.0");
#endif
}
/*
@ -159,12 +147,10 @@ ATF_TC_HEAD(sqrtf_nan, tc)
ATF_TC_BODY(sqrtf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(sqrtf(x)) != 0);
#endif
}
ATF_TC(sqrtf_powf);
@ -175,7 +161,6 @@ ATF_TC_HEAD(sqrtf_powf, tc)
ATF_TC_BODY(sqrtf_powf, tc)
{
#ifndef __vax__
const float x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.9999 };
const float eps = 1.0e-30;
volatile float y, z;
@ -190,7 +175,6 @@ ATF_TC_BODY(sqrtf_powf, tc)
atf_tc_fail_nonfatal("sqrtf(%0.03f) != "
"powf(%0.03f, 1/2)\n", x[i], x[i]);
}
#endif
}
ATF_TC(sqrtf_inf_neg);
@ -201,12 +185,10 @@ ATF_TC_HEAD(sqrtf_inf_neg, tc)
ATF_TC_BODY(sqrtf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
float y = sqrtf(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(sqrtf_inf_pos);
@ -217,13 +199,11 @@ ATF_TC_HEAD(sqrtf_inf_pos, tc)
ATF_TC_BODY(sqrtf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
float y = sqrtf(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(sqrtf_zero_neg);
@ -234,13 +214,11 @@ ATF_TC_HEAD(sqrtf_zero_neg, tc)
ATF_TC_BODY(sqrtf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = sqrtf(x);
if (fabsf(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("sqrtf(-0.0) != -0.0");
#endif
}
ATF_TC(sqrtf_zero_pos);
@ -251,13 +229,11 @@ ATF_TC_HEAD(sqrtf_zero_pos, tc)
ATF_TC_BODY(sqrtf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = sqrtf(x);
if (fabsf(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("sqrtf(+0.0) != +0.0");
#endif
}
/*
@ -271,12 +247,10 @@ ATF_TC_HEAD(sqrtl_nan, tc)
ATF_TC_BODY(sqrtl_nan, tc)
{
#ifndef __vax__
const long double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(sqrtl(x)) != 0);
#endif
}
ATF_TC(sqrtl_powl);
@ -287,7 +261,6 @@ ATF_TC_HEAD(sqrtl_powl, tc)
ATF_TC_BODY(sqrtl_powl, tc)
{
#ifndef __vax__
const long double x[] = { 0.0, 0.005, 1.0, 99.0, 123.123, 9999.9999 };
const long double eps = 5.0*DBL_EPSILON; /* XXX powl == pow for now */
volatile long double y, z;
@ -302,7 +275,6 @@ ATF_TC_BODY(sqrtl_powl, tc)
atf_tc_fail_nonfatal("sqrtl(%0.03Lf) != "
"powl(%0.03Lf, 1/2)\n", x[i], x[i]);
}
#endif
}
ATF_TC(sqrtl_inf_neg);
@ -313,12 +285,10 @@ ATF_TC_HEAD(sqrtl_inf_neg, tc)
ATF_TC_BODY(sqrtl_inf_neg, tc)
{
#ifndef __vax__
const long double x = -1.0L / 0.0L;
long double y = sqrtl(x);
ATF_CHECK(isnan(y) != 0);
#endif
}
ATF_TC(sqrtl_inf_pos);
@ -329,13 +299,11 @@ ATF_TC_HEAD(sqrtl_inf_pos, tc)
ATF_TC_BODY(sqrtl_inf_pos, tc)
{
#ifndef __vax__
const long double x = 1.0L / 0.0L;
long double y = sqrtl(x);
ATF_CHECK(isinf(y) != 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TC(sqrtl_zero_neg);
@ -346,13 +314,11 @@ ATF_TC_HEAD(sqrtl_zero_neg, tc)
ATF_TC_BODY(sqrtl_zero_neg, tc)
{
#ifndef __vax__
const long double x = -0.0L;
long double y = sqrtl(x);
if (fabsl(y) > 0.0 || signbit(y) == 0)
atf_tc_fail_nonfatal("sqrtl(-0.0) != -0.0");
#endif
}
ATF_TC(sqrtl_zero_pos);
@ -363,13 +329,11 @@ ATF_TC_HEAD(sqrtl_zero_pos, tc)
ATF_TC_BODY(sqrtl_zero_pos, tc)
{
#ifndef __vax__
const long double x = 0.0L;
long double y = sqrtl(x);
if (fabsl(y) > 0.0 || signbit(y) != 0)
atf_tc_fail_nonfatal("sqrtl(+0.0) != +0.0");
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_tan.c,v 1.4 2011/09/15 11:05:50 he Exp $ */
/* $NetBSD: t_tan.c,v 1.5 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -81,12 +81,10 @@ ATF_TC_HEAD(tan_nan, tc)
ATF_TC_BODY(tan_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(tan(x)) != 0);
#endif
}
ATF_TC(tan_inf_neg);
@ -97,11 +95,9 @@ ATF_TC_HEAD(tan_inf_neg, tc)
ATF_TC_BODY(tan_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
ATF_CHECK(isnan(tan(x)) != 0);
#endif
}
ATF_TC(tan_inf_pos);
@ -112,11 +108,9 @@ ATF_TC_HEAD(tan_inf_pos, tc)
ATF_TC_BODY(tan_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
ATF_CHECK(isnan(tan(x)) != 0);
#endif
}
@ -128,11 +122,9 @@ ATF_TC_HEAD(tan_zero_neg, tc)
ATF_TC_BODY(tan_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
ATF_CHECK(tan(x) == x);
#endif
}
ATF_TC(tan_zero_pos);
@ -143,11 +135,9 @@ ATF_TC_HEAD(tan_zero_pos, tc)
ATF_TC_BODY(tan_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
ATF_CHECK(tan(x) == x);
#endif
}
/*
@ -161,7 +151,6 @@ ATF_TC_HEAD(tanf_angles, tc)
ATF_TC_BODY(tanf_angles, tc)
{
#ifndef __vax__
const float eps = 1.0e-6;
float x, y;
size_t i;
@ -175,7 +164,6 @@ ATF_TC_BODY(tanf_angles, tc)
atf_tc_fail_nonfatal("tanf(%d deg) != %0.01f",
angles[i].angle, angles[i].y);
}
#endif
}
ATF_TC(tanf_nan);
@ -186,12 +174,10 @@ ATF_TC_HEAD(tanf_nan, tc)
ATF_TC_BODY(tanf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(tanf(x)) != 0);
#endif
}
ATF_TC(tanf_inf_neg);
@ -202,14 +188,12 @@ ATF_TC_HEAD(tanf_inf_neg, tc)
ATF_TC_BODY(tanf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
if (isnan(tanf(x)) == 0) {
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("tanf(-Inf) != NaN");
}
#endif
}
ATF_TC(tanf_inf_pos);
@ -220,14 +204,12 @@ ATF_TC_HEAD(tanf_inf_pos, tc)
ATF_TC_BODY(tanf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
if (isnan(tanf(x)) == 0) {
atf_tc_expect_fail("PR lib/45362");
atf_tc_fail("tanf(+Inf) != NaN");
}
#endif
}
@ -239,11 +221,9 @@ ATF_TC_HEAD(tanf_zero_neg, tc)
ATF_TC_BODY(tanf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
ATF_CHECK(tanf(x) == x);
#endif
}
ATF_TC(tanf_zero_pos);
@ -254,11 +234,9 @@ ATF_TC_HEAD(tanf_zero_pos, tc)
ATF_TC_BODY(tanf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
ATF_CHECK(tanf(x) == x);
#endif
}
ATF_TP_ADD_TCS(tp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: t_tanh.c,v 1.6 2011/09/12 17:45:51 jruoho Exp $ */
/* $NetBSD: t_tanh.c,v 1.7 2014/03/03 10:39:08 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_tanh.c,v 1.6 2011/09/12 17:45:51 jruoho Exp $");
__RCSID("$NetBSD: t_tanh.c,v 1.7 2014/03/03 10:39:08 martin Exp $");
#include <atf-c.h>
#include <math.h>
@ -45,12 +45,10 @@ ATF_TC_HEAD(tanh_nan, tc)
ATF_TC_BODY(tanh_nan, tc)
{
#ifndef __vax__
const double x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(tanh(x)) != 0);
#endif
}
ATF_TC(tanh_inf_neg);
@ -61,11 +59,9 @@ ATF_TC_HEAD(tanh_inf_neg, tc)
ATF_TC_BODY(tanh_inf_neg, tc)
{
#ifndef __vax__
const double x = -1.0L / 0.0L;
ATF_CHECK(tanh(x) == -1.0);
#endif
}
ATF_TC(tanh_inf_pos);
@ -76,11 +72,9 @@ ATF_TC_HEAD(tanh_inf_pos, tc)
ATF_TC_BODY(tanh_inf_pos, tc)
{
#ifndef __vax__
const double x = 1.0L / 0.0L;
ATF_CHECK(tanh(x) == 1.0);
#endif
}
ATF_TC(tanh_zero_neg);
@ -91,7 +85,6 @@ ATF_TC_HEAD(tanh_zero_neg, tc)
ATF_TC_BODY(tanh_zero_neg, tc)
{
#ifndef __vax__
const double x = -0.0L;
double y = tanh(x);
@ -100,7 +93,6 @@ ATF_TC_BODY(tanh_zero_neg, tc)
ATF_REQUIRE_MSG(signbit(y) != 0,
"compiler bug, waiting for newer gcc import, see PR lib/44057");
#endif
}
ATF_TC(tanh_zero_pos);
@ -111,14 +103,12 @@ ATF_TC_HEAD(tanh_zero_pos, tc)
ATF_TC_BODY(tanh_zero_pos, tc)
{
#ifndef __vax__
const double x = 0.0L;
double y = tanh(x);
ATF_CHECK(x == y);
ATF_CHECK(signbit(x) == 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
/*
@ -132,12 +122,10 @@ ATF_TC_HEAD(tanhf_nan, tc)
ATF_TC_BODY(tanhf_nan, tc)
{
#ifndef __vax__
const float x = 0.0L / 0.0L;
ATF_CHECK(isnan(x) != 0);
ATF_CHECK(isnan(tanhf(x)) != 0);
#endif
}
ATF_TC(tanhf_inf_neg);
@ -148,11 +136,9 @@ ATF_TC_HEAD(tanhf_inf_neg, tc)
ATF_TC_BODY(tanhf_inf_neg, tc)
{
#ifndef __vax__
const float x = -1.0L / 0.0L;
ATF_CHECK(tanhf(x) == -1.0);
#endif
}
ATF_TC(tanhf_inf_pos);
@ -163,11 +149,9 @@ ATF_TC_HEAD(tanhf_inf_pos, tc)
ATF_TC_BODY(tanhf_inf_pos, tc)
{
#ifndef __vax__
const float x = 1.0L / 0.0L;
ATF_CHECK(tanhf(x) == 1.0);
#endif
}
ATF_TC(tanhf_zero_neg);
@ -178,7 +162,6 @@ ATF_TC_HEAD(tanhf_zero_neg, tc)
ATF_TC_BODY(tanhf_zero_neg, tc)
{
#ifndef __vax__
const float x = -0.0L;
float y = tanh(x);
@ -187,7 +170,6 @@ ATF_TC_BODY(tanhf_zero_neg, tc)
ATF_REQUIRE_MSG(signbit(y) != 0,
"compiler bug, waiting for newer gcc import, see PR lib/44057");
#endif
}
ATF_TC(tanhf_zero_pos);
@ -198,14 +180,12 @@ ATF_TC_HEAD(tanhf_zero_pos, tc)
ATF_TC_BODY(tanhf_zero_pos, tc)
{
#ifndef __vax__
const float x = 0.0L;
float y = tanhf(x);
ATF_CHECK(x == y);
ATF_CHECK(signbit(x) == 0);
ATF_CHECK(signbit(y) == 0);
#endif
}
ATF_TP_ADD_TCS(tp)