Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libm Additions to PR lib/45362: the float variants...
details: https://anonhg.NetBSD.org/src/rev/377621add122
branches: trunk
changeset: 769560:377621add122
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Sep 14 13:29:58 2011 +0000
description:
Additions to PR lib/45362: the float variants cosf(3), sinf(3), and tanf(3)
do not detect NaN for positive and negative infinity on i386 (qemu).
diffstat:
tests/lib/libm/t_cos.c | 12 +++++++++---
tests/lib/libm/t_sin.c | 12 +++++++++---
tests/lib/libm/t_tan.c | 12 +++++++++---
3 files changed, 27 insertions(+), 9 deletions(-)
diffs (99 lines):
diff -r acada9aad139 -r 377621add122 tests/lib/libm/t_cos.c
--- a/tests/lib/libm/t_cos.c Wed Sep 14 13:13:21 2011 +0000
+++ b/tests/lib/libm/t_cos.c Wed Sep 14 13:29:58 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cos.c,v 1.2 2011/09/14 06:50:43 jruoho Exp $ */
+/* $NetBSD: t_cos.c,v 1.3 2011/09/14 13:29:58 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -206,7 +206,10 @@
#ifndef __vax__
const float x = -1.0L / 0.0L;
- ATF_CHECK(isnan(cosf(x)) != 0);
+ if (isnan(cosf(x)) == 0) {
+ atf_tc_expect_fail("PR lib/45362");
+ atf_tc_fail("cosf(-Inf) != NaN");
+ }
#endif
}
@@ -221,7 +224,10 @@
#ifndef __vax__
const float x = 1.0L / 0.0L;
- ATF_CHECK(isnan(cosf(x)) != 0);
+ if (isnan(cosf(x)) == 0) {
+ atf_tc_expect_fail("PR lib/45362");
+ atf_tc_fail("cosf(+Inf) != NaN");
+ }
#endif
}
diff -r acada9aad139 -r 377621add122 tests/lib/libm/t_sin.c
--- a/tests/lib/libm/t_sin.c Wed Sep 14 13:13:21 2011 +0000
+++ b/tests/lib/libm/t_sin.c Wed Sep 14 13:29:58 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sin.c,v 1.2 2011/09/14 06:50:43 jruoho Exp $ */
+/* $NetBSD: t_sin.c,v 1.3 2011/09/14 13:29:58 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -206,7 +206,10 @@
#ifndef __vax__
const float x = -1.0L / 0.0L;
- ATF_CHECK(isnan(sinf(x)) != 0);
+ if (isnan(sinf(x)) == 0) {
+ atf_tc_expect_fail("PR lib/45362");
+ atf_tc_fail("sinf(-Inf) != NaN");
+ }
#endif
}
@@ -221,7 +224,10 @@
#ifndef __vax__
const float x = 1.0L / 0.0L;
- ATF_CHECK(isnan(sinf(x)) != 0);
+ if (isnan(sinf(x)) == 0) {
+ atf_tc_expect_fail("PR lib/45362");
+ atf_tc_fail("sinf(+Inf) != NaN");
+ }
#endif
}
diff -r acada9aad139 -r 377621add122 tests/lib/libm/t_tan.c
--- a/tests/lib/libm/t_tan.c Wed Sep 14 13:13:21 2011 +0000
+++ b/tests/lib/libm/t_tan.c Wed Sep 14 13:29:58 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_tan.c,v 1.2 2011/09/14 06:50:43 jruoho Exp $ */
+/* $NetBSD: t_tan.c,v 1.3 2011/09/14 13:29:58 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -203,7 +203,10 @@
#ifndef __vax__
const float x = -1.0L / 0.0L;
- ATF_CHECK(isnan(tanf(x)) != 0);
+ if (isnan(tanf(x)) == 0) {
+ atf_tc_expect_fail("PR lib/45362");
+ atf_tc_fail("tanf(-Inf) != NaN");
+ }
#endif
}
@@ -218,7 +221,10 @@
#ifndef __vax__
const float x = 1.0L / 0.0L;
- ATF_CHECK(isnan(tanf(x)) != 0);
+ if (isnan(tanf(x)) == 0) {
+ atf_tc_expect_fail("PR lib/45362");
+ atf_tc_fail("tanf(+Inf) != NaN");
+ }
#endif
}
Home |
Main Index |
Thread Index |
Old Index