aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-25 15:58:29 +0200
committerMattias Andrée <maandree@kth.se>2016-07-25 15:58:29 +0200
commit4d2e79e7eec793a557c26d1253bcfc13f6b555d6 (patch)
treef8b89ad4245c3e9657cac43577ea29d4847d415f
parentManual: how to calculate the legendre symbol (diff)
downloadlibzahl-4d2e79e7eec793a557c26d1253bcfc13f6b555d6.tar.gz
libzahl-4d2e79e7eec793a557c26d1253bcfc13f6b555d6.tar.bz2
libzahl-4d2e79e7eec793a557c26d1253bcfc13f6b555d6.tar.xz
Style fix
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--doc/exercises.tex8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/exercises.tex b/doc/exercises.tex
index 23b8ef4..e89c2b3 100644
--- a/doc/exercises.tex
+++ b/doc/exercises.tex
@@ -168,13 +168,13 @@ For improved performance, instead of using \texttt{zmod},
you can use the recursive function
%
\( \displaystyle{
- k ~\mbox{Mod}~ 2^n - 1 =
+ k \mod (2^n - 1) =
\left (
- (k ~\mbox{Mod}~ 2^n) + \lfloor k \div 2^n \rfloor
- \right ) ~\mbox{Mod}~ 2^n - 1,
+ (k \mod 2^n) + \lfloor k \div 2^n \rfloor
+ \right ) \mod (2^n - 1),
}\)
%
-where $k ~\mbox{Mod}~ 2^n$ is efficiently calculated
+where $k \mod 2^n$ is efficiently calculated
using \texttt{zand($k$, $2^n - 1$)}. (This optimisation
is not part of the difficulty rating of this problem.)