Skip to content

Commit 2d13336

Browse files
godbyktkoeppe
authored andcommitted
[macros, rand] Improve the spacing around bit operators. (#2073)
1 parent c668372 commit 2d13336

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

source/macros.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@
215215
%%--------------------------------------------------
216216
%% States and operators
217217
\newcommand{\state}[2]{\tcode{#1}\ensuremath{_{#2}}}
218-
\newcommand{\bitand}{\ensuremath{\, \mathsf{bitand} \,}}
219-
\newcommand{\bitor}{\ensuremath{\, \mathsf{bitor} \,}}
220-
\newcommand{\xor}{\ensuremath{\, \mathsf{xor} \,}}
221-
\newcommand{\rightshift}{\ensuremath{\, \mathsf{rshift} \,}}
222-
\newcommand{\leftshift}[1]{\ensuremath{\, \mathsf{lshift}_#1 \,}}
218+
\newcommand{\bitand}{\ensuremath{\mathbin{\mathsf{bitand}}}}
219+
\newcommand{\bitor}{\ensuremath{\mathbin{\mathsf{bitor}}}}
220+
\newcommand{\xor}{\ensuremath{\mathbin{\mathsf{xor}}}}
221+
\newcommand{\rightshift}{\ensuremath{\mathbin{\mathsf{rshift}}}}
222+
\newcommand{\leftshift}[1]{\ensuremath{\mathbin{\mathsf{lshift}_{#1}}}}
223223

224224
%% Notes and examples
225225
\newcommand{\noteintro}[1]{[\,\textit{#1:}\space}

source/numerics.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@
14441444
\pnum
14451445
Throughout this subclause,
14461446
the operators
1447-
\bitand, \bitor, and \xor
1447+
\bitand, \bitor, and \xor{}
14481448
denote the respective conventional bitwise operations.
14491449
Further:
14501450

@@ -2883,7 +2883,7 @@
28832883
\item
28842884
With $\alpha = a \cdot (Y \bitand 1)$,
28852885
set $X_i$ to
2886-
$X_{i+m-n} \, \xor \, (Y \rightshift 1) \, \xor \, \alpha$.
2886+
$X_{i+m-n} \xor (Y \rightshift 1) \xor \alpha$.
28872887
\end{enumeratea}
28882888
The sequence $X$ is initialized
28892889
with the help of an initialization multiplier $f$.
@@ -2898,9 +2898,9 @@
28982898
\item
28992899
Let $z_1 = X_i \xor \bigl(( X_i \rightshift u ) \bitand d\bigr)$.
29002900
\item
2901-
Let $z_2 = z_1 \xor \bigl( (z_1 \leftshift{w} \, s) \bitand b \bigr)$.
2901+
Let $z_2 = z_1 \xor \bigl( (z_1 \leftshift{w} s) \bitand b \bigr)$.
29022902
\item
2903-
Let $z_3 = z_2 \xor \bigl( (z_2 \leftshift{w} \, t) \bitand c \bigr)$.
2903+
Let $z_3 = z_2 \xor \bigl( (z_2 \leftshift{w} t) \bitand c \bigr)$.
29042904
\item
29052905
Let $z_4 = z_3 \xor ( z_3 \rightshift \ell )$.
29062906
\end{enumeratea}
@@ -4007,7 +4007,7 @@
40074007
in which
40084008
each operation is to be carried out modulo $2^{32}$,
40094009
each indexing operator applied to \tcode{begin} is to be taken modulo $n$,
4010-
and $T(x)$ is defined as $x \, \xor \, (x \, \rightshift \, 27)$:
4010+
and $T(x)$ is defined as $x \xor (x \rightshift 27)$:
40114011

40124012
\begin{enumeratea}
40134013
\item

0 commit comments

Comments
 (0)