Skip to content

Commit facc682

Browse files
authoredFeb 23, 2024
Fix some typos I noticed in the Programming Cryptol book. (#1631)
- p-1 bits in an IEEE float refers to the significand, not the mantissa, at least according to the latest preferred terminology, which aims to keep the word "mantissa" for the full mantissa including the units bit; - reciprocal rather than reciprocol; - the example in 1.23 had the wrong module declarations; also insert a separator word between the verbatim blocks so they can be told apart.
1 parent 707257e commit facc682

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

Diff for: ‎docs/ProgrammingCryptol/crashCourse/CrashCourse.tex

+6-3
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ \section{Floating Point Numbers}
365365

366366
The family of types \texttt{Float e p}\indTheFloatType represent IEEE 754
367367
floating point numbers with \texttt{e} bits in the exponent and
368-
\texttt{p-1} bits in the mantissa. The family is defined in a built-in
368+
\texttt{p-1} bits in the significand. The family is defined in a built-in
369369
module called \texttt{Float} so to use it you'd need to either import
370370
it in your Cryptol specification or use \texttt{:m Float} on the
371371
Cryptol REPL.
@@ -3206,7 +3206,7 @@ \section{Type classes}\indTypeClasses
32063206
The \texttt{Field} typeclass represents values that, in addition to
32073207
being a \texttt{Ring}, have multiplictive inverses.
32083208
It includes the field division operation \texttt{/.} and the
3209-
\texttt{recip} operation for computing the reciprocol of a value.
3209+
\texttt{recip} operation for computing the reciprocal of a value.
32103210
Currently, only type \texttt{Rational} is a member of this class.
32113211

32123212
\item
@@ -3598,6 +3598,7 @@ \section{Program structure with modules}
35983598
accordingly:
35993599

36003600
\begin{verbatim}
3601+
module Hash::SHA3 where
36013602
36023603
sha3 : {n} (fin n) => [n] -> [512]
36033604
sha3 = error "Stubbed, for demonstration only: sha3-512"
@@ -3606,8 +3607,10 @@ \section{Program structure with modules}
36063607
blocksize = 576
36073608
\end{verbatim}
36083609

3610+
and
3611+
36093612
\begin{verbatim}
3610-
module Hash::SHA3 where
3613+
module HMAC where
36113614
import Hash::SHA3
36123615
36133616
hmac : {keySize, msgSize} (fin keySize, fin msgSize) => [keySize] -> [msgSize] -> [512]

0 commit comments

Comments
 (0)