10.24.228 math_errhandling
¶
ISO C23 specification:
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf section 7.12.1
Documentation:
man math_error
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
- This macro is missing on some platforms:
NetBSD 10.0, mingw.
- This macro does not describe the error behaviour
of elementary arithmetic operations (+, -, *, /)
and of mathematical operations for which the compiler emits inline code
(such as
sqrt
on some CPUs).
- This macro does not describe the error behaviour of functions
such as
strtod
.
- For mathematical operations in general, it is a safer bet to look
at the exceptions set in the floating-point environment
(by calling
feclearexcept (FE_ALL_EXCEPT)
before the operation
and fetestexcept
after the operation),
regardless of math_errhandling
.