[round.style] Remove "the" to clarify there may be multiple values#8944
[round.style] Remove "the" to clarify there may be multiple values#8944eisenwave wants to merge 1 commit intocplusplus:mainfrom
Conversation
|
I guess this is P1 by the standard of "normative wording is broken", even though it's not a very impactful problem in this case. |
|
I'm not sure whether this is editorial. @jensmaurer? |
Sorry, I don't follow. 9.5 = 9 + 1/2 and 10.0 = 10 + 0/2. Seems like only 10.0 has an even least significant binary digit. |
|
Yeah sorry, From ISO/IEC 60559:
I don't think any other wording depends on this edge case; it would only be theoretically possible if we specified somethng like In general, "digit" refers to digits in the significant rather than digits in the decimal representation. To my understanding, this whole edge case is purely theoretical in C++ (it can take place in some ISO/IEC 60559 operations), so I guess you could even keep it as is and it would make no normative difference. Still, we are defining the counterpart to roundTiesToEven with |
|
If we want to permit the example of 9.5 rounding to 9 vs. 1x10^1, then there is no number with even least significant digit among the choices (both are odd), so removal of "the" in the wording doesn't help. Sorry, I'm still not seeing an example where this fix would be an improvement. |
Fixes #8942
The current wording "the one" suggests that a disambiguation takes place in all cases, but that's not true. For binary floating-point numbers with one-digit precision, both
9.5and10.0have an even least significant binary digit and are equally near to9.75, so rounding is ambiguous in that case.