Floating-point comparisons in the middle-end
Joseph Myers
joseph@codesourcery.com
Thu Sep 1 19:16:50 GMT 2022
On Thu, 1 Sep 2022, FX via Gcc wrote:
> The next thing I need to tackle for Fortran is the implementation of
> functions that perform maxNum, maxNumMag, minNum, and minNumMag. Am I
> correct in assuming that maxNum and minNum correspond to fmin and fmax?
Yes (note that maxNum and minNum were removed in IEEE 754-2019, but
they're still what fmax and fmin correspond to; the new minimum / maximum
operations in IEEE 754-2019 are provided by new functions in C2x).
> Are there builtins for maxNumMag and minNumMag? Or does anyone know what
> the “canonical” way to perform it is? I do not want to mess up corners
> cases, which is so easy to do…
TS 18661-1 defined functions fmaxmag and fminmag for those; we don't have
built-in functions for them, and C2x does not include those functions
given that those operations were also removed in IEEE 754-2019.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list