Module Name: src Committed By: martin Date: Tue Oct 15 13:27:11 UTC 2024
Modified Files: src/tests/lib/libm [netbsd-9]: t_next.c Log Message: Additionally pull up following revision(s) (requested by riastradh in ticket #1906): tests/lib/libm/t_next.c: revision 1.7 tests/lib/libm/t_next: Disable a test if long double is double. This test, to verify nexttoward(x, x*(1 - LDBL_EPSILON/2)) moves in the direction of x*(1 - LDBL_EPSILON/2), only makes sense if long double has more precision than double -- the point of the exercise is to verify that nexttoward moves even if the direction parameter can't be rounded to double. But if long double is just double, this test makes no sense. To generate a diff of this commit: cvs rdiff -u -r1.7.6.2 -r1.7.6.3 src/tests/lib/libm/t_next.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_next.c diff -u src/tests/lib/libm/t_next.c:1.7.6.2 src/tests/lib/libm/t_next.c:1.7.6.3 --- src/tests/lib/libm/t_next.c:1.7.6.2 Sun Oct 13 15:09:57 2024 +++ src/tests/lib/libm/t_next.c Tue Oct 15 13:27:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_next.c,v 1.7.6.2 2024/10/13 15:09:57 martin Exp $ */ +/* $NetBSD: t_next.c,v 1.7.6.3 2024/10/15 13:27:10 martin Exp $ */ /*- * Copyright (c) 2024 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_next.c,v 1.7.6.2 2024/10/13 15:09:57 martin Exp $"); +__RCSID("$NetBSD: t_next.c,v 1.7.6.3 2024/10/15 13:27:10 martin Exp $"); #include <atf-c.h> #include <float.h> @@ -110,10 +110,12 @@ check(const double *x, unsigned n) for (i = n; i --> 1;) { ATF_REQUIRE_MSG(x[i - 1] < x[i], "i=%u", i); +#ifdef __HAVE_LONG_DOUBLE if (isnormal(x[i])) { CHECK(i, nexttoward, x[i], x[i]*(1 - LDBL_EPSILON/2), x[i - 1]); } +#endif CHECK(i, nextafter, x[i], x[i - 1], x[i - 1]); CHECK(i, nexttoward, x[i], x[i - 1], x[i - 1]);