Up to [cvs.NetBSD.org] / src / tests / lib / libm
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
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.
Additionally pull up following revision(s) (requested by riastradh in ticket #963): 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.
Pull up following revision(s) (requested by riastradh in ticket #963): tests/lib/libm/Makefile: revision 1.49 distrib/sets/lists/tests/mi: revision 1.1315 tests/lib/libm/t_next.c: revision 1.1 tests/lib/libm/t_next.c: revision 1.2 distrib/sets/lists/debug/mi: revision 1.435 tests/lib/libm/t_next.c: revision 1.3 tests/lib/libm/t_next.c: revision 1.4 tests/lib/libm/t_next.c: revision 1.5 tests/lib/libm/t_next.c: revision 1.6 lib/libm/src/s_nexttoward.c: revision 1.3 (all via patch) tests/lib/libm: Test nextafter/nexttoward and variants. The tests are fairly trivial but should work without any conditionals about floating-point formats. tests/lib/libm/t_next: Disable this test on VAX. But leave a replacement xfail test that fails unconditionally, to leave a reminder in the tests of PR 57881: vax libm is missing various symbols. tests/lib/libm/t_next: Fix stub on VAX. Tested building the wrong tree, oops. tests/lib/libm/t_next: Expand substantially. This covers many more potential problem areas -- and includes a new xfail test for PR lib/58236: nexttoward(3) is broken on subnormals. tests/lib/libm/t_next: nexttoward works if it's just nextafter. It's broken on platforms where long double and double aren't the same and nexttoward isn't an alias for nextafter. nexttoward(3): Fix high-word test on small positive subnormals. By this point in the logic, x can't be zero, so it's either positive or negative. The high word hx, however, can be zero, when x is a small positive subnormal. This means x is a small positive subnormal, so if x > y we are computing nextDown, and if x < y we are computing nextUp. hx is a (signed 32-bit) integer, not a double floating-point number, so it's a little silly to compare hx > 0.0. But that on its own isn't enough to trigger the bug because all signed 32-bit integers can be represented by double on all NetBSD architectures. PR lib/58236
Pull up following revision(s) (requested by riastradh in ticket #963): tests/lib/libm/Makefile: revision 1.49 distrib/sets/lists/tests/mi: revision 1.1315 tests/lib/libm/t_next.c: revision 1.1 tests/lib/libm/t_next.c: revision 1.2 distrib/sets/lists/debug/mi: revision 1.435 tests/lib/libm/t_next.c: revision 1.3 tests/lib/libm/t_next.c: revision 1.4 tests/lib/libm/t_next.c: revision 1.5 tests/lib/libm/t_next.c: revision 1.6 lib/libm/src/s_nexttoward.c: revision 1.3 tests/lib/libm: Test nextafter/nexttoward and variants. The tests are fairly trivial but should work without any conditionals about floating-point formats. tests/lib/libm/t_next: Disable this test on VAX. But leave a replacement xfail test that fails unconditionally, to leave a reminder in the tests of PR 57881: vax libm is missing various symbols. tests/lib/libm/t_next: Fix stub on VAX. Tested building the wrong tree, oops. tests/lib/libm/t_next: Expand substantially. This covers many more potential problem areas -- and includes a new xfail test for PR lib/58236: nexttoward(3) is broken on subnormals. tests/lib/libm/t_next: nexttoward works if it's just nextafter. It's broken on platforms where long double and double aren't the same and nexttoward isn't an alias for nextafter. nexttoward(3): Fix high-word test on small positive subnormals. By this point in the logic, x can't be zero, so it's either positive or negative. The high word hx, however, can be zero, when x is a small positive subnormal. This means x is a small positive subnormal, so if x > y we are computing nextDown, and if x < y we are computing nextUp. hx is a (signed 32-bit) integer, not a double floating-point number, so it's a little silly to compare hx > 0.0. But that on its own isn't enough to trigger the bug because all signed 32-bit integers can be represented by double on all NetBSD architectures. PR lib/58236
file t_next.c was added on branch netbsd-9 on 2024-10-13 15:09:57 +0000
file t_next.c was added on branch netbsd-10 on 2024-10-13 15:05:17 +0000
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.
nexttoward(3): Fix high-word test on small positive subnormals. By this point in the logic, x can't be zero, so it's either positive or negative. The high word hx, however, can be zero, when x is a small positive subnormal. This means x is a small positive subnormal, so if x > y we are computing nextDown, and if x < y we are computing nextUp. hx is a (signed 32-bit) integer, not a double floating-point number, so it's a little silly to compare hx > 0.0. But that on its own isn't enough to trigger the bug because all signed 32-bit integers can be represented by double on all NetBSD architectures. PR lib/58236
tests/lib/libm/t_next: nexttoward works if it's just nextafter. It's broken on platforms where long double and double aren't the same and nexttoward isn't an alias for nextafter.
tests/lib/libm/t_next: Expand substantially. This covers many more potential problem areas -- and includes a new xfail test for PR lib/58236: nexttoward(3) is broken on subnormals.
tests/lib/libm/t_next: Fix stub on VAX. Tested building the wrong tree, oops.
tests/lib/libm/t_next: Disable this test on VAX. But leave a replacement xfail test that fails unconditionally, to leave a reminder in the tests of PR 57881: vax libm is missing various symbols.
tests/lib/libm: Test nextafter/nexttoward and variants. The tests are fairly trivial but should work without any conditionals about floating-point formats.