libm: remainder: make sure x is zero
Make sure the entirety of x is zero before flipping the sign bit.
Otherwise the sign would be wrong for small values of x when x is
negative and |n*y| > |x|
Approved by: re (cperciva)
Reported by: alfredo
PR: 251091
Reviewed by: kargl
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53023
(cherry picked from commit 25cca51ed294890d20a3c0290814cd26875db686)
(cherry picked from commit 583e976d6d09770a6299a19603d4f0dbaa562cac)