diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2025-02-19 21:03:53 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2025-02-19 21:03:53 +0100 |
| commit | 30fb502038c560ffa10418153887b536011306ab (patch) | |
| tree | a83edfcdd999a50c3337dde02941215d04a6929c | |
| parent | ce41ee064f64efff57a9b355c88b14b9f18bbcb5 (diff) | |
mulMod only in opt version
| -rw-r--r-- | content/math/math.tex | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/content/math/math.tex b/content/math/math.tex index 2509e27..f1eec86 100644 --- a/content/math/math.tex +++ b/content/math/math.tex @@ -28,19 +28,22 @@ \end{algorithm}
\columnbreak
-\subsection{Mod-Exponent und Multiplikation über $\boldsymbol{\mathbb{F}_p}$}
-%\vspace{-1.25em}
-%\begin{multicols}{2}
-\method{mulMod}{berechnet $a \cdot b \bmod n$}{\log(b)}
-\sourcecode{math/modMulIterativ.cpp}
-% \vfill\null\columnbreak
-\method{powMod}{berechnet $a^b \bmod n$}{\log(b)}
-\sourcecode{math/modPowIterativ.cpp}
-%\end{multicols}
-%\vspace{-2.75em}
-\begin{itemize}
- \item für $a > 10^9$ \code{__int128} oder \code{modMul} benutzten!
-\end{itemize}
+\subsection{Potenzen in $\boldsymbol{\mathbb{Z}/n\mathbb{Z}}$}
+ \begin{methods}
+ \method{powMod}{berechnet $a^b \bmod n$}{\log(b)}
+ \end{methods}
+ \sourcecode{math/modPowIterativ.cpp}
+ \begin{itemize}
+ \item für $a > 10^9$ \code{__int128} oder \code{modMul} benutzten!
+ \end{itemize}
+
+\optional{
+\subsection{Multiplikation in $\boldsymbol{\mathbb{Z}/n\mathbb{Z}}$ \opthint}
+ \begin{methods}
+ \method{mulMod}{berechnet $a \cdot b \bmod n$}{\log(b)}
+ \end{methods}
+ \sourcecode{math/modMulIterativ.cpp}
+}
\begin{algorithm}{ggT, kgV, erweiterter euklidischer Algorithmus}
\runtime{\log(a) + \log(b)}
|
