The NetBSD Project

CVS log for src/tests/lib/libm/t_next.c

[BACK] Up to [cvs.NetBSD.org] / src / tests / lib / libm

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.7.6.3: download - view: text, markup, annotated - select for diffs
Tue Oct 15 13:27:10 2024 UTC (3 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.7.6.2: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.6.2: +4 -2 lines
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.

Revision 1.7.4.3: download - view: text, markup, annotated - select for diffs
Tue Oct 15 13:07:42 2024 UTC (3 months ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE
Diff to: previous 1.7.4.2: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.4.2: +4 -2 lines
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.

Revision 1.7.6.2: download - view: text, markup, annotated - select for diffs
Sun Oct 13 15:09:57 2024 UTC (3 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.7.6.1: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.6.1: +885 -0 lines
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

Revision 1.7.4.2: download - view: text, markup, annotated - select for diffs
Sun Oct 13 15:05:17 2024 UTC (3 months ago) by martin
Branches: netbsd-10
Diff to: previous 1.7.4.1: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.4.1: +885 -0 lines
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

Revision 1.7.6.1
Sun May 12 20:17:57 2024 UTC (8 months, 1 week ago) by martin
Branches: netbsd-9
FILE REMOVED
Changes since revision 1.7: +0 -887 lines
file t_next.c was added on branch netbsd-9 on 2024-10-13 15:09:57 +0000

Revision 1.7.4.1
Sun May 12 20:17:57 2024 UTC (8 months, 1 week ago) by martin
Branches: netbsd-10
FILE REMOVED
Changes since revision 1.7: +0 -887 lines
file t_next.c was added on branch netbsd-10 on 2024-10-13 15:05:17 +0000

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun May 12 20:17:57 2024 UTC (8 months, 1 week ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Branch point for: netbsd-9, netbsd-10
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -2 lines
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.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat May 11 02:07:54 2024 UTC (8 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -5 lines
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

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat May 11 01:44:12 2024 UTC (8 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -2 lines
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.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed May 8 17:27:03 2024 UTC (8 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +788 -84 lines
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.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun May 5 14:34:58 2024 UTC (8 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +9 -4 lines
tests/lib/libm/t_next: Fix stub on VAX.

Tested building the wrong tree, oops.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun May 5 14:29:38 2024 UTC (8 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +20 -2 lines
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.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun May 5 02:53:02 2024 UTC (8 months, 2 weeks ago) by riastradh
Branches: MAIN
tests/lib/libm: Test nextafter/nexttoward and variants.

The tests are fairly trivial but should work without any conditionals
about floating-point formats.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>