This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][Fortran][v2] Use MIN/MAX_EXPR for min/max intrinsics
On Wed, 18 Jul 2018, Janne Blomqvist wrote:
> minimumNumber(a, NaN) = minimumNumber(NaN, a) = a
>
> That is minimumNumber corresponds to minnum in IEEE 754-2008 and fmin* in
No, it differs in the handling of signaling NaNs (with minimumNumber, if
the NaN argument is signaling, it results in the "invalid" exception but
the non-NaN argument is still returned, whereas with minNum, a quiet NaN
was returned in that case). A new fminimum_num function is proposed as a
C binding to the new operation.
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2273.pdf
(The new operations are also more strictly defined regarding zero
arguments, to treat -0 as less than +0, which was unspecified for minNum
and fmin.)
--
Joseph S. Myers
joseph@codesourcery.com