Skip to content

Commit 056d741

Browse files
committed
fix erroneous float division
This line should be using // for integer division instead of / for float division. This was missed in the transition from Python 2 to 3. Fixes #1.
1 parent df2705c commit 056d741

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyecm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ def mainloop(n, u, p1):
911911
small_jump = max(120, small_jump)
912912
big_jump = 1 + (int(sqrt((5 << w) // 21)) << 1)
913913
total_jump = small_jump * big_jump
914-
big_multiple = max(total_jump << 1, ((int(next_prime(prime)) - (total_jump >> 1)) / total_jump) * total_jump)
914+
big_multiple = max(total_jump << 1, ((int(next_prime(prime)) - (total_jump >> 1)) // total_jump) * total_jump)
915915
big_jump_2 = big_jump >> 1
916916
small_jump_2 = small_jump >> 1
917917
product = ONE

0 commit comments

Comments
 (0)