C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] P0493R3: Atomic minimum/maximum: std::min/std::max versus std::fmin/std::fmax (and potential future C language evolution)

From: Hubert Tong <hubert.reinterpretcast_at_[hidden]>
Date: Wed, 12 Oct 2022 18:08:43 -0400
On Wed, Oct 12, 2022 at 1:19 PM Joseph Myers <joseph_at_[hidden]>
wrote:

> On Wed, 12 Oct 2022, Hubert Tong via Liaison wrote:
>
> > P0493R3 (
> > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0493r3.pdf)
> > proposes atomic floating-point min/max based on std::min and std::max.
> >
> > std::min and std::max are known to disagree with std::fmin/std::fmax for
> > things like signed zeros and NaN values.
>
> Note also that fmin and fmax are the old operations from IEEE 754-2008.
> The operations from IEEE 754-2019 are fminimum, fmaximum, fminimum_num and
> fmaximum_num in C23.
>

Thanks. That certainly makes it unclear which behaviour is wanted (the
`_num` or the other).
I also did not realize that the choice between differently signed zeros was
not specified for fmin/fmax.


> --
> Joseph S. Myers
> joseph_at_[hidden]
>

Received on 2022-10-12 22:09:12