Skip to content

Commit c674a0b

Browse files
committed
[spec] Tweak math layout
1 parent 905f42d commit c674a0b

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

document/core/exec/numerics.rst

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -161,48 +161,49 @@ Floating-Point
161161
where :math:`M = \significand(N)` and :math:`E = \exponent(N)`.
162162

163163

164-
.. index:: byte, little endian, memory
165-
.. _aux-littleendian:
166-
.. _aux-bytes:
164+
.. index:: numeric vector, shape, lane
165+
.. _aux-lanes:
167166

168-
Storage
167+
Vectors
169168
.......
170169

171-
When a number is stored into :ref:`memory <syntax-mem>`, it is converted into a sequence of :ref:`bytes <syntax-byte>` in |LittleEndian|_ byte order:
170+
Numeric vectors have the same underlying representation as an |i128|.
171+
They can also be interpreted as a sequence of numeric values packed into a |V128| with a particular |shape|.
172172

173173
.. math::
174+
\begin{array}{l}
174175
\begin{array}{lll@{\qquad}l}
175-
\bytes_t(i) &=& \littleendian(\bits_t(i)) \\[1ex]
176-
\littleendian(\epsilon) &=& \epsilon \\
177-
\littleendian(d^8~{d'}^\ast~) &=& \littleendian({d'}^\ast)~\ibits_8^{-1}(d^8) \\
176+
\lanes_{t\K{x}N}(c) &=&
177+
c_0~\dots~c_{N-1} \\
178+
\end{array}
179+
\\ \qquad
180+
\begin{array}[t]{@{}r@{~}l@{}l@{~}l@{~}l}
181+
(\where & B &=& |t| / 8 \\
182+
\wedge & b^{16} &=& \bytes_{\i128}(c) \\
183+
\wedge & c_i &=& \bytes_{t}^{-1}(b^{16}[i \cdot B \slice B]))
184+
\end{array}
178185
\end{array}
179186
180-
Again these functions are invertible bijections.
187+
These functions are bijections, so they are invertible.
181188

182189

183-
.. index:: numeric vectors, shape
184-
.. _aux-lanes:
190+
.. index:: byte, little endian, memory
191+
.. _aux-littleendian:
192+
.. _aux-bytes:
185193

186-
Vectors
194+
Storage
187195
.......
188196

189-
Numeric vectors have the same underlying representation as an |i128|. They can also be interpreted as a sequence of numeric values packed into a |V128| with a particular |shape|.
197+
When a number is stored into :ref:`memory <syntax-mem>`, it is converted into a sequence of :ref:`bytes <syntax-byte>` in |LittleEndian|_ byte order:
190198

191199
.. math::
192-
\begin{array}{l}
193200
\begin{array}{lll@{\qquad}l}
194-
\lanes_{t\K{x}N}(c) &=&
195-
c_0~\dots~c_{N-1} \\
196-
\end{array}
197-
\\ \qquad
198-
\begin{array}[t]{@{}r@{~}l@{}}
199-
(\where & B = |t| / 8 \\
200-
\wedge & b^{16} = \bytes_{\i128}(c) \\
201-
\wedge & c_i = \bytes_{t}^{-1}(b^{16}[i \cdot B \slice B]))
202-
\end{array}
201+
\bytes_t(i) &=& \littleendian(\bits_t(i)) \\[1ex]
202+
\littleendian(\epsilon) &=& \epsilon \\
203+
\littleendian(d^8~{d'}^\ast~) &=& \littleendian({d'}^\ast)~\ibits_8^{-1}(d^8) \\
203204
\end{array}
204205
205-
These functions are bijections, so they are invertible.
206+
Again these functions are invertible bijections.
206207

207208

208209
.. index:: integer

document/core/util/macros.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,8 +1197,8 @@
11971197
.. |ieee| mathdef:: \xref{exec/numerics}{aux-ieee}{\F{float}}
11981198
.. |nans| mathdef:: \xref{exec/numerics}{aux-nans}{\F{nans}}
11991199
.. |trunc| mathdef:: \xref{exec/numerics}{aux-trunc}{\F{trunc}}
1200-
.. |satu| mathdef:: \xref{exec/numerics}{aux-sat_u}{\F{sat}^{\K{u}}}
1201-
.. |sats| mathdef:: \xref{exec/numerics}{aux-sat_s}{\F{sat}^{\K{s}}}
1200+
.. |satu| mathdef:: \xref{exec/numerics}{aux-sat_u}{\F{sat\_u}}
1201+
.. |sats| mathdef:: \xref{exec/numerics}{aux-sat_s}{\F{sat\_s}}
12021202

12031203
.. |lanes| mathdef:: \xref{exec/numerics}{aux-lanes}{\F{lanes}}
12041204

0 commit comments

Comments
 (0)