[cfp-interest 3529] Re: Rounding Direction Mode or Rounding Direction or Rounding Mode
Damian McGuckin
damianm at esi.com.au
Tue Jun 10 23:48:54 PDT 2025
On Wed, 11 Jun 2025, Damian McGuckin wrote:
> This could be caused by the values returned by FLT_ROUNDS, the rounding modes
> of 5.3.5.3.3, are likely to be different to values more suited to a control
> register buried in FE_UPWARD, FE_DOWNWARD, FE_TONEAREST, .. even though there
> is a 1:1 mapping between them and the modes, and the ISO/IEC 60559 names.
>
> But the interrelationships needs better explanation. And which is which?
I note that F.10.1#3 says
For each single-argument function f in <math.h> whose mathematical
counterpart is antisymmetric (odd), f(-x) is -f(x) for the ISO/IEC
60559 rounding modes roundTiesToEven, roundTiesToAway, and
roundTowardZero, and for all x in the (valid) domain of the
function.
Can we assume that the names "roundTiesToEven" and its mates are ISO/IEC
60559 rounding modes, at least in the language of C2Y.
If so, we need to be clear that FLT_ROUNDS returns numbers that have a 1:1
correspondence with those names, and the macros of 7.6, i.e. FE_UPWARD,
and its mates, also have a 1:1 correspondance with them.
Thanks - Damian
More information about the cfp-interest
mailing list