File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 6228
6228
\indextext {zero!undefined division by}%
6229
6229
If the second operand of \tcode {/} or \tcode {\% } is zero, the behavior is
6230
6230
undefined.
6231
- For integral operands, the \tcode {/} operator yields the algebraic quotient with
6232
- any fractional part discarded;
6233
- \begin {footnote }
6234
- This is often called truncation towards zero.
6235
- \end {footnote }
6236
- if the quotient \tcode {a/b} is representable in the type of the result,
6237
- \tcode {(a/b)*b + a\% b} is equal to \tcode {a}; otherwise, the behavior
6231
+ For integral operands, the \tcode {/} operator yields the algebraic quotient
6232
+ rounded towards zero.
6233
+ \begin {note }
6234
+ If the quotient \tcode {a/b} is representable in the type of the result,
6235
+ \tcode {(a/b)*b + a\% b} is equal to \tcode {a};
6236
+ otherwise, the behavior
6238
6237
of both \tcode {a/b} and \tcode {a\% b} is undefined.
6238
+ \end {note }
6239
6239
6240
6240
\rSec 2[expr.add]{Additive operators}%
6241
6241
\indextext {expression!additive operators}%
You can’t perform that action at this time.
0 commit comments