Page MenuHomeFreeBSD

fmax.3: Add caveat for going beyond C std requirements
ClosedPublic

Authored by emaste on Thu, Apr 2, 10:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 11, 7:55 AM
Unknown Object (File)
Thu, Apr 9, 10:08 PM
Unknown Object (File)
Thu, Apr 9, 7:59 PM
Unknown Object (File)
Thu, Apr 9, 7:15 AM
Unknown Object (File)
Tue, Apr 7, 7:01 PM
Unknown Object (File)
Mon, Apr 6, 2:28 PM
Unknown Object (File)
Sun, Apr 5, 10:17 AM
Unknown Object (File)
Fri, Apr 3, 3:47 PM

Details

Summary
libm's fmax and fmin family of functions treat +0.0 as greater than
-0.0.  This is not required by the C standard, so the user may not see
this behaviour due to compiler optimization.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

fuz added a subscriber: jesuscblazquez_gmail.com.

Once we get fmaximum_num and fminimum_num in, we should recommend that those be used instead. CC @jesuscblazquez_gmail.com.

This revision is now accepted and ready to land.Thu, Apr 2, 10:11 PM