Up to [cvs.NetBSD.org] / src / tests / lib / libm
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Pull up following revision(s) (requested by gdt in ticket #912): distrib/sets/lists/debug/mi: revision 1.449 lib/libm/src/s_remquo.c: revision 1.3 lib/libm/src/s_remquo.c: revision 1.4 distrib/sets/lists/tests/mi: revision 1.1339 tests/lib/libm/t_remquo.c: revision 1.1 tests/lib/libm/t_remquo.c: revision 1.2 tests/lib/libm/Makefile: revision 1.51 tests: Add test for remquo This test currently fails, because remquo has bugs. (A bugfix will be committed soon.) Test vectors derived from results from code by Charles Karney in GeodesicLib/proj, and manually inspected. t_remquo: Work around missing remquo(3) for vax Part of PR port-vax/57881 libm/remquo: Fix bug where wrong quotient was returned Fix taken from FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=166463 https://cgit.freebsd.org/src/commit/lib/msun/src/s_remquo.c?id=1cbd288942b08217e99bf889e0967895d53af00c FreeBSD commit message: Fix a bug in remquo{,f,l}, in which the quotient didn't always have the correct sign when the remainder was 0. Fix a separate bug in remquo alone, in which the remainder and quotient were both off by a bit in certain cases involving subnormal remainders. The bugs affected all platforms except amd64 and i386, on which the routines are implemented in assembly. (On NetBSD, this bug manifests on amd64.) libm/remquo: Fix bug where remquo returned wrong sign of quo ISO C requires that quo be congruent to the quotient mod 2^k and have a particular sign. The current code can return 0 when it should be negative. Because the code chooses k=31 (for the requirement of congruence modulo 2^k), the only value available (in ILP32 or LP64) that is negative and congruent to 0 is 0x80000000. In the specific case of wanting "-0", return 0x80000000. Resolves t_remquo test failure.
file t_remquo.c was added on branch netbsd-10 on 2024-10-02 12:46:13 +0000
t_remquo: Work around missing remquo(3) for vax Part of PR port-vax/57881
tests: Add test for remquo This test currently fails, because remquo has bugs. (A bugfix will be committed soon.) Test vectors derived from results from code by Charles Karney in GeodesicLib/proj, and manually inspected.