Issue | Summary | Status |
---|---|---|
1014 | Error handling in <reduc.h> and <augarith.h> |
Review |
<reduc.h>
and <augarith.h>
Authors: Joseph Myers
Date: 2025-03-27
Status: Review
TS 18661-4:2025 talks about domain errors and range errors for
functions in <reduc.h>
and <augarith.h>
.
In the first (2015) edition of TS 18661-4, the functions were
described as being added to <math.h>
so it was clear that the error
handling semantics for <math.h>
described in the C standard applied.
With the functions now being in new headers, it is no longer clear
whether those semantics (C23 7.12.2 (Treatment of error conditions))
apply to these functions, or whether different semantics might apply
(such as the <complex.h>
semantics where setting errno
is optional
even when the value of math_errhandling
means it must be set by
<math.h>
functions).
An explicit statement should be added, either applying the rules from
<math.h>
to error handling for functions in the new headers, or
stating how error handling requirements differ from those in
<math.h>
. (No specific wording is proposed here.)
Comment from Issues list maintainer on 2025-06-27:
Reflector message 30750 suggests wording to address this issue.
Comment from Issues list maintainer on 2025-09-01:
At the August 2025 (Brno) meeting of WG14, the wording from Reflector message 30750 was accepted, subject to review at the next meeting.
In 6.1, before the paragraph beginning "For each of the following synopses,", and also in 7.1, before the paragraph beginning "For each of the following synopses,", add the paragraph:
For the terms “domain error” and “range error” used in the following subclauses, the specification in C23 7.12.2 pertains as though the functions were declared in
<math.h>
.