Skip to content

Commit f51996e

Browse files
burblebeetkoeppe
authored andcommitted
CWG2724 Clarify rounding for arithmetic right shift
1 parent 1706db8 commit f51996e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/expressions.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6345,7 +6345,8 @@
63456345
\end{note}
63466346

63476347
\pnum
6348-
The value of \tcode{E1 >> E2} is $\tcode{E1} / 2^\tcode{E2}$, rounded down.
6348+
The value of \tcode{E1 >> E2} is $\tcode{E1} / 2^\tcode{E2}$,
6349+
rounded towards negative infinity.
63496350
\begin{note}
63506351
\tcode{E1} is right-shifted \tcode{E2} bit positions.
63516352
Right-shift on signed integral types is an arithmetic right shift,

0 commit comments

Comments
 (0)