Currently we will get the wrong result as follows: remquof(0x7bb33336, 0x63000000) = -671088640, 0x00000000 /* wrong sign in quo */ remquo(0xbff0000000000003, 0x3ff0000000000003) = 1, 0x8000000000000000 /* wrong sign in quo */ remquo(0x9120000000000001, 0x0000000000000005) = -1288490188, 0x0000000000000004 /* wrong quo and rem parts */ while [an example of] correct one should be: remquof(0x7bb33336, 0x63000000) = 1476395008, 0x00000000 remquo(0xbff0000000000003, 0x3ff0000000000003) = -1, 0x8000000000000000 remquo(0x9120000000000001, 0x0000000000000005) = -1288490189, 0x0000000000000001 That does not fit into description in C99 standard: e.g. "In the object pointed to by quo they store a value whose sign is the sign of x/y" Fix attached Fix: Fix should be applied to \msun\src\s_remquo.c \msun\src\s_remquof.c Fix attached. Patch attached with submission follows: How-To-Repeat: Reproducible in description
Responsible Changed From-To: freebsd-standards->das This looks like the right fix. I will look into it.
State Changed From-To: open->patched Thanks for the bug report and the patch! I've applied it in r233973, which fixes remquol() as well.
State Changed From-To: patched->closed Merged to 7, 8, and 9-STABLE in revs 234533-234535.