In C++20 (or later), are there any operations involving floating point numbers that are guaranteed by the standard to never throw?
What about
- assignment and copy construction?
- comparison?
- arithmetic?
Note, I am concerned here only with ordinary regular C++ exceptions, not the special notion of "floating-point exceptions".
Here is a more precise formulation of my question:
If a and b are mutable objects of type double, which of the following expressions, if any, are guaranteed by the C++ standard to evaluate to true?
noexcept(a = b)noexcept(a == b)noexcept(a + b)
For new readers, I'd like to clarify that I am only interested in "defined behavior", that is, everything that is not undefined behavior.
Floating point operators are none of those.
Notes are not normative, but they are good enough for me.