This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
Section: 29.7.1 [cmath.syn], 32.5.8.4 [atomics.types.float] Status: New Submitter: Jan Schultke Opened: 2026-09-07 Last modified: 2026-09-08
Priority: Not Prioritized
View other active issues in [cmath.syn].
View all other issues in [cmath.syn].
View all issues with New status.
Discussion:
In 29.7.1 [cmath.syn], none of fmin, fminimum, or fminimum_num are marked freestanding;
the same applies to the maximum functions. P3008R6 never acknowledges this issue in
the context of making the atomic counterparts freestanding, and 17.3.2 [version.syn] advertises
__cpp_lib_atomic_min_max as a test for a freestanding feature.
For
fetch_fmaximumandfetch_fminimum, the maximum and minimum computation is performed as if byfmaximumandfminimum, respectively, with the value pointed to by this and the first parameter as the arguments.
Since fminimum is only used for the "minimum computation", there is seemingly no requirement to modify
the floating-point environment or errno (for a signaling NaN argument), which makes sense for a freestanding
implementation.
fminimum function in the first place,
which makes it questionable to say that the computation happens "as if by" something that doesn't exist.
The intent might be that the computation merely follows the same restrictions as fminimum. However, that
also raises the question whether the computation results of fminimum and fetch_fminimum have to be bitwise
identical (as implied by "as if by", and applying only if fminimum actually exists) or merely follow the
same rules for determining the result, while yielding potentially different NaN payloads and handling excess
precision differently..
Possible directions:
Make atomic floating-point minimum and maximum freestanding-deleted.
Make the underlying <cmath> functions freestanding.
Clarify that the computation of the atomic operations follows the same rules as that
of the <cmath> functions, without relying on their existence. Also clarify
whether fminimum computations have to produce bitwise identical results to fetch_fminimum
computations.
Proposed resolution: