2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

Removed potenzation

This commit is contained in:
Martin Thoma 2013-09-01 11:18:19 +02:00
parent 0c402a5951
commit f111747eb1
2 changed files with 8 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Before After
Before After

View file

@ -40,7 +40,13 @@
\EndIf
\ElsIf{!$\Call{isPrime}{|a|}$} \Comment{Regel (II)}
\State $p_1, p_2, \dots, p_n \gets \Call{Faktorisiere}{a}$
\State \Return $\prod_{i=1}^n \Call{CalculateLegendre}{p_i, a}$
\State \Return $\prod_{i=1}^n \Call{CalculateLegendre}{p_i, a}$ \Comment{nun: $a \in \mathbb{P}$}
\ElsIf{$a == 2$} \Comment{Regel (VII)}
\If{$a \equiv \pm 1 \mod 8$}
\State \Return 1
\Else
\State \Return -1
\EndIf \Comment{nun: $a \in \mathbb{P}, a \geq 3$}
\ElsIf{$p == 3$} \Comment{Regel (IV)}
\State $t \gets p \mod 3$
\If{$t == 2$}
@ -48,7 +54,7 @@
\EndIf
\State \Return $t$
\Else
\State \Return $a^\frac{p-1}{2} \mod p$
\State \Return $(-1) \cdot \Call{CalculateLegendre}{p, a}$
\EndIf
\end{algorithmic}
\caption{Calculate Legendre-Symbol}