HomeFreeBSD

libm: remainder: make sure x is zero

Description

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)

Details

Provenance
vexeduxrAuthored on Fri, Oct 10, 9:30 AM
cpercivaCommitted on Thu, Oct 16, 5:37 PM
Differential Revision
D53023: libm: remainder: make sure x is zero
Parents
rG2b4d38a47503: openssh: blocklist: Remove non async-signal safe probe
Branches
Unknown
Tags
Unknown