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

fixed bug

This commit is contained in:
Martin Thoma 2013-09-01 12:40:23 +02:00
parent b0a72dc66c
commit b9095ef768
3 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Before After
Before After

View file

@ -36,7 +36,7 @@
\State \Return $\prod_{i=1}^n \Call{CalculateLegendre}{p_i, p}$
\Else \Comment{now: $a \in \mathbb{P}, \sqrt{p-2} \geq a \geq 3$}
\If{$\frac{p-1}{2} \equiv 0 \mod 2$}
\State \Return $(-1) \cdot \Call{CalculateLegendre}{p, a}$
\State \Return $\Call{CalculateLegendre}{p, a}$
\Else
\State \Return $(-1) \cdot \Call{CalculateLegendre}{p, a}$
\EndIf

View file

@ -27,9 +27,9 @@ def calculateLegendre(a, p):
>>> calculateLegendre(3, 29)
-1
>>> calculateLegendre(111, 41)
>>> calculateLegendre(111, 41) # Beispiel aus dem Skript, S. 114
-1
>>> calculateLegendre(113, 41)
>>> calculateLegendre(113, 41) # Beispiel aus dem Skript, S. 114
1
"""
if a >= p or a < 0: