[cfp-interest 3606] Re: Rounding Mode

Vincent Lefevre vincent at vinc17.net
Sun Sep 21 16:17:03 PDT 2025


On 2025-09-21 16:08:25 +1000, Damian McGuckin wrote:
> 
> Some thoughts ...
> 
> On the list of items carried over is an issue I mentioned before in passing.
> I figure I should elaborate.
> 
> Previously C2? talked about rounding mode (what IEEE 754 calls the rounding
> attribute).

rounding-direction attribute

There are other kinds of attributes, but these are recommendations
or optional features for language standards. I've never looked at
this closely.

> The concept of Rounding Precision (which is not a mode) got into the C

C23 says "rounding precision mode".

> strandard. It is not really discussed in detail and appears only 3 times.
> Is it something for the future?  Not sure I can the value in standardizing
> it but I could be naive.

For the future? More likely for the past. :-)

FYI, the i386 architecture is being dropped by Linux distributions.
And I'm not aware of any future architecture reintroducing dynamic
precision. The only way it could work reliably would be to have it
at the same time as the fixed precisions, e.g. 2 bits could be
reserved in an instruction: 3 values for fixed precisions and one
for a dynamic precision.

Note that FLT_EVAL_METHOD is still there and has been extended for
the future (mainly due to _Float16 for architectures that do not
support rounding to binary16), but this is different from the
concept of dynamic precision.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)


More information about the cfp-interest mailing list