C++ Logo


Advanced search

[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 00:11:34 -0400
P0493R3 (
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.
I do not imagine a world where future C evolution will agree with the
std::min and std::max behaviour.

Have the appropriate groups discussed this?

Also, I believe the example implementations in the paper are erroneous in
relation to the presented wording.
For example, in section 5.1 of the paper, the operands to `max` are in the
wrong order.

-- HT

Received on 2022-10-12 04:12:03