MIN/MAX and trapping math and NANs
Joseph Myers
joseph@codesourcery.com
Tue Apr 11 17:50:08 GMT 2023
On Tue, 11 Apr 2023, Michael Matz via Gcc wrote:
> Note that this makes minNum/maxNum (and friends) not associative. Also,
> different languages and different hardware implement fmin/fmax different
> and sometimes in conflict with 754-2008 (e.g. on SSE2 maxsd isn't
> commutative but maxNum is!). This can be considered a defect in 754-2008.
> As result these operations were demoted in 754-2019 and new functions
> minimumNumber (and friends) recommended (those propagate a qNaN).
Yes. fmax/fmin correspond to the IEEE 754-2008 operations. C2x has new
functions corresponding to the IEEE 754-2019 operations.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list