History log of /src/tests/lib/libm/t_next.c |
Revision | | Date | Author | Comments |
1.8 |
| 07-Apr-2025 |
riastradh | tests: Use `#if __*_HAS_DENORM__', not `#ifdef __*_HAS_DENORM__'.
The compiler defines this to zero on, e.g., VAX.
PR port-vax/59261: t_fpclassify tests are failing
|
1.7 |
| 12-May-2024 |
riastradh | branches: 1.7.4; 1.7.6; 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.
|
1.6 |
| 11-May-2024 |
riastradh | 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
|
1.5 |
| 11-May-2024 |
riastradh | 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.
|
1.4 |
| 08-May-2024 |
riastradh | 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.
|
1.3 |
| 05-May-2024 |
riastradh | tests/lib/libm/t_next: Fix stub on VAX.
Tested building the wrong tree, oops.
|
1.2 |
| 05-May-2024 |
riastradh | 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.
|
1.1 |
| 05-May-2024 |
riastradh | tests/lib/libm: Test nextafter/nexttoward and variants.
The tests are fairly trivial but should work without any conditionals about floating-point formats.
|
1.7.6.3 |
| 15-Oct-2024 |
martin | 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.
|
1.7.6.2 |
| 13-Oct-2024 |
martin | 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
|
1.7.6.1 |
| 12-May-2024 |
martin | file t_next.c was added on branch netbsd-9 on 2024-10-13 15:09:57 +0000
|
1.7.4.3 |
| 15-Oct-2024 |
martin | 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.
|
1.7.4.2 |
| 13-Oct-2024 |
martin | 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
|
1.7.4.1 |
| 12-May-2024 |
martin | file t_next.c was added on branch netbsd-10 on 2024-10-13 15:05:17 +0000
|