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:
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 |
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue