Module Name: src Committed By: gdt Date: Fri Sep 20 22:45:15 UTC 2024
Modified Files: src/lib/libm/src: s_remquo.c Log Message: 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. \todo pullups \todo check/fix remquof and remquol To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libm/src/s_remquo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.