Skip to content

Commit edfe321

Browse files
committed
[expr.mul] Reword 'truncation towards zero', turn tutorial-like wording into note
1 parent 23430d7 commit edfe321

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

source/expressions.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6228,14 +6228,14 @@
62286228
\indextext{zero!undefined division by}%
62296229
If the second operand of \tcode{/} or \tcode{\%} is zero, the behavior is
62306230
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
62386237
of both \tcode{a/b} and \tcode{a\%b} is undefined.
6238+
\end{note}
62396239

62406240
\rSec2[expr.add]{Additive operators}%
62416241
\indextext{expression!additive operators}%

0 commit comments

Comments
 (0)