Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libm Use fabsf(3) when appropriate.
details: https://anonhg.NetBSD.org/src/rev/1d19758c1e6d
branches: trunk
changeset: 769550:1d19758c1e6d
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Sep 14 06:50:43 2011 +0000
description:
Use fabsf(3) when appropriate.
diffstat:
tests/lib/libm/t_cos.c | 4 ++--
tests/lib/libm/t_ldexp.c | 12 ++++++------
tests/lib/libm/t_sin.c | 4 ++--
tests/lib/libm/t_tan.c | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diffs (94 lines):
diff -r 8e249582f0c9 -r 1d19758c1e6d tests/lib/libm/t_cos.c
--- a/tests/lib/libm/t_cos.c Wed Sep 14 05:18:18 2011 +0000
+++ b/tests/lib/libm/t_cos.c Wed Sep 14 06:50:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cos.c,v 1.1 2011/09/14 05:18:19 jruoho Exp $ */
+/* $NetBSD: t_cos.c,v 1.2 2011/09/14 06:50:43 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -173,7 +173,7 @@
x = angles[i].x;
y = angles[i].y;
- if (fabs(cosf(x) - y) > eps)
+ if (fabsf(cosf(x) - y) > eps)
atf_tc_fail_nonfatal("cosf(%d deg) != %0.01f",
angles[i].angle, angles[i].y);
}
diff -r 8e249582f0c9 -r 1d19758c1e6d tests/lib/libm/t_ldexp.c
--- a/tests/lib/libm/t_ldexp.c Wed Sep 14 05:18:18 2011 +0000
+++ b/tests/lib/libm/t_ldexp.c Wed Sep 14 06:50:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ldexp.c,v 1.5 2011/09/13 07:03:36 jruoho Exp $ */
+/* $NetBSD: t_ldexp.c,v 1.6 2011/09/14 06:50:43 jruoho 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.5 2011/09/13 07:03:36 jruoho Exp $");
+__RCSID("$NetBSD: t_ldexp.c,v 1.6 2011/09/14 06:50:43 jruoho Exp $");
#include <math.h>
#include <limits.h>
@@ -164,6 +164,10 @@
#endif
}
+/*
+ * ldexpf(3)
+ */
+
ATF_TC(ldexpf_exp2f);
ATF_TC_HEAD(ldexpf_exp2f, tc)
{
@@ -207,10 +211,6 @@
#endif
}
-/*
- * ldexpf(3)
- */
-
ATF_TC(ldexpf_inf_neg);
ATF_TC_HEAD(ldexpf_inf_neg, tc)
{
diff -r 8e249582f0c9 -r 1d19758c1e6d tests/lib/libm/t_sin.c
--- a/tests/lib/libm/t_sin.c Wed Sep 14 05:18:18 2011 +0000
+++ b/tests/lib/libm/t_sin.c Wed Sep 14 06:50:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sin.c,v 1.1 2011/09/14 05:18:19 jruoho Exp $ */
+/* $NetBSD: t_sin.c,v 1.2 2011/09/14 06:50:43 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -173,7 +173,7 @@
x = angles[i].x;
y = angles[i].y;
- if (fabs(sinf(x) - y) > eps)
+ if (fabsf(sinf(x) - y) > eps)
atf_tc_fail_nonfatal("sinf(%d deg) != %0.01f",
angles[i].angle, angles[i].y);
}
diff -r 8e249582f0c9 -r 1d19758c1e6d tests/lib/libm/t_tan.c
--- a/tests/lib/libm/t_tan.c Wed Sep 14 05:18:18 2011 +0000
+++ b/tests/lib/libm/t_tan.c Wed Sep 14 06:50:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_tan.c,v 1.1 2011/09/14 05:18:19 jruoho Exp $ */
+/* $NetBSD: t_tan.c,v 1.2 2011/09/14 06:50:43 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
x = angles[i].x;
y = angles[i].y;
- if (fabs(tanf(x) - y) > eps)
+ if (fabsf(tanf(x) - y) > eps)
atf_tc_fail_nonfatal("tanf(%d deg) != %0.01f",
angles[i].angle, angles[i].y);
}
Home |
Main Index |
Thread Index |
Old Index