Skip to content

Commit

Permalink
Fixed naive prime checker
Browse files Browse the repository at this point in the history
  • Loading branch information
sirfoga committed Aug 16, 2017
1 parent 5bb945f commit da1b46f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ acs-*.bib

# knitr
*-concordance.tex
# TODO Comment the next line if you want to keep your tikz graphics files
*.tikz
*-tikzDictionary

Expand Down Expand Up @@ -493,7 +492,6 @@ TSWLatexianTemp*
# hyperref

# knitr
# TODO Comment the next line if you want to keep your tikz graphics files

# listings

Expand Down
8 changes: 0 additions & 8 deletions hal/maths/maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,6 @@ def test_miller_rabin(self, precision):
if precision < 0:
raise ValueError('precision must be positive')

# basic sort out
if self.to_int < 2:
return False
elif self.to_int == 2:
return True
elif self.to_int % 2 == 0:
return False

# true -> probably prime
# false -> composite

Expand Down

0 comments on commit da1b46f

Please sign in to comment.