Module Name:    src
Committed By:   bouyer
Date:           Sun Jun 23 11:16:50 UTC 2013

Modified Files:
        src/tests/lib/libm [netbsd-6]: t_atan.c

Log Message:
Pull up following revision(s) (requested by isaki in ticket #903):
        tests/lib/libm/t_atan.c: revisions 1.4 - 1.7, 1.9 via patch
Fix and revive test of atan_inf_neg, atan_inf_pos and atan_tan on i386.
PR port-i386/46108.
The machine epsilon 1.0e-40 is too severe and nonsense for double
because DBL_EPSILON is about 2.2e-16 .  I think that 1.0e-15 is
enough good, in this case.
XXX However, test of atan_tan should be replaced for other reasons.
Remove header files which became unnecessary in 1.7.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.4.1 src/tests/lib/libm/t_atan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libm/t_atan.c
diff -u src/tests/lib/libm/t_atan.c:1.1 src/tests/lib/libm/t_atan.c:1.1.4.1
--- src/tests/lib/libm/t_atan.c:1.1	Sat Sep 17 18:08:35 2011
+++ src/tests/lib/libm/t_atan.c	Sun Jun 23 11:16:50 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_atan.c,v 1.1 2011/09/17 18:08:35 jruoho Exp $ */
+/* $NetBSD: t_atan.c,v 1.1.4.1 2013/06/23 11:16:50 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@ ATF_TC_BODY(atan_inf_neg, tc)
 {
 #ifndef __vax__
 	const double x = -1.0L / 0.0L;
-	const float eps = 1.0e-40;
+	const double eps = 1.0e-15;
 
 	if (fabs(atan(x) + M_PI_2) > eps)
 		atf_tc_fail_nonfatal("atan(-Inf) != -pi/2");
@@ -78,7 +78,7 @@ ATF_TC_BODY(atan_inf_pos, tc)
 {
 #ifndef __vax__
 	const double x = +1.0L / 0.0L;
-	const float eps = 1.0e-40;
+	const double eps = 1.0e-15;
 
 	if (fabs(atan(x) - M_PI_2) > eps)
 		atf_tc_fail_nonfatal("atan(+Inf) != pi/2");
@@ -95,7 +95,7 @@ ATF_TC_BODY(atan_tan, tc)
 {
 #ifndef __vax__
 	const double x[] = { 0.0, 1.0, M_PI / 2, M_PI / 3, M_PI / 6 };
-	const double eps = 1.0e-40;
+	const double eps = 1.0e-15;
 	double y;
 	size_t i;
 

Reply via email to