book: Render gtab and invtab as matrices

This commit is contained in:
Jack Grigg 2021-02-19 01:13:16 +00:00
parent b148c34c10
commit 6717594c46
1 changed files with 12 additions and 7 deletions

View File

@ -269,13 +269,18 @@ Let $x_3 = uv^2, x_2 = x_3^{2^8}, x_1 = x_2^{2^8}, x_0 = x_1^{2^8}.$
#### Precompute the following tables:
$$
\begin{array}{l}
gtab[0] = g^0, g^1, ..., g^{255} \\
gtab[1] = (g^{2^8})^0, (g^{2^8})^1, ..., (g^{2^8})^{255} \\
gtab[2] = (g^{2^{16}})^0, (g^{2^{16}})^1, ..., (g^{2^{16}})^{255} \\
gtab[3] = (g^{2^{24}})^0, (g^{2^{24}})^1, ..., (g^{2^{24}})^{255} \\
invtab = (g^{2^{-24}})^0, (g^{2^{-24}})^1, ..., (g^{2^{-24}})^{255} \\
\end{array}
gtab = \begin{bmatrix}
g^0 & g^1 & ... & g^{255} \\
(g^{2^8})^0 & (g^{2^8})^1 & ... & (g^{2^8})^{255} \\
(g^{2^{16}})^0 & (g^{2^{16}})^1 & ... & (g^{2^{16}})^{255} \\
(g^{2^{24}})^0 & (g^{2^{24}})^1 & ... & (g^{2^{24}})^{255}
\end{bmatrix}
$$
$$
invtab = \begin{bmatrix}
(g^{2^{-24}})^0 & (g^{2^{-24}})^1 & ... & (g^{2^{-24}})^{255}
\end{bmatrix}
$$
### i = 0, 1