<div dir="ltr">I wrote up a preliminary proposal for WG21/C++ to deprecate fesetround() and friends, and replace it with explicit rounding mode parameters.<div><br></div><div>Unfortunately, the official WG21 December 15 mailing hasn't yet been put together, but I believe the paper is unofficially accessible at <a href="https://isocpp.org/files/papers/P2746R0.pdf">https://isocpp.org/files/papers/P2746R0.pdf</a>.</div><div><br></div><div>I think rounding modes are currently significantly more broken in C than C++. But my impression is that many of the same issues also apply in C.</div><div><br></div><div>Jim Thomas pointed me at minutes from the last discussion. I'm interested in what was meant by "Interval arithmetic lends itself to block based control like upper bounds in one block, lower in another", and the rationale behind it. My view is that this is a case in which you really want to control rounding mode on a per-operation basis, and any sort of scope-based mechanism is unlikely to be helpful.</div><div><br></div><div>AFAICT, most use cases that actually aim for guarantees on the output value (a) need careful per-operation control, and (b) need the interpretation of constants to reflect the rounding mode. (Or need to very carefully avoid constants that might not be exactly representable.)</div><div><br></div><div>Hans</div></div>