Browse Source

fixed bug

Martin Thoma 12 years ago
parent
commit
b9095ef768

BIN
source-code/Pseudocode/Calculate-Legendre/Calculate-Legendre.png


+ 1 - 1
source-code/Pseudocode/Calculate-Legendre/Calculate-Legendre.tex

@@ -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

+ 2 - 2
source-code/Pseudocode/Calculate-Legendre/calculateLegendre.py

@@ -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: