prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Concatenate/consolidate all algorithms with different implementations
  ### Feature description
  
  There are lots of algorithms with the same concept but different implementations/methods in different files. All these should be moved into one file
  
  </issue>
  <code>
  [start of maths/miller_rabin.py]
  1 import random
  2 
  3 from .binary_exp_mod import bin_exp_mod
  4 
  5 
  6 # This is a probabilistic check to test primality, useful for big numbers!
  7 # if it's a prime, it will return true
  8 # if it's not a prime, the chance of it returning true is at most 1/4**prec
  9 def is_prime_big(n, prec=1000):
  10     """
  11     >>> from maths.prime_check import is_prime
  12     >>> # all(is_prime_big(i) == is_prime(i) for i in range(1000))  # 3.45s
  13     >>> all(is_prime_big(i) == is_prime(i) for i in range(256))
  14     True
  15     """
  16     if n < 2:
  17         return False
  18 
  19     if n % 2 == 0:
  20         return n == 2
  21 
  22     # this means n is odd
  23     d = n - 1
  24     exp = 0
  25     while d % 2 == 0:
  26         d /= 2
  27         exp += 1
  28 
  29     # n - 1=d*(2**exp)
  30     count = 0
  31     while count < prec:
  32         a = random.randint(2, n - 1)
  33         b = bin_exp_mod(a, d, n)
  34         if b != 1:
  35             flag = True
  36             for _ in range(exp):
  37                 if b == n - 1:
  38                     flag = False
  39                     break
  40                 b = b * b
  41                 b %= n
  42             if flag:
  43                 return False
  44             count += 1
  45     return True
  46 
  47 
  48 if __name__ == "__main__":
  49     n = abs(int(input("Enter bound : ").strip()))
  50     print("Here's the list of primes:")
  51     print(", ".join(str(i) for i in range(n + 1) if is_prime_big(i)))
  52
  [end of maths/miller_rabin.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/maths/miller_rabin.py b/maths/miller_rabin.py
  deleted file mode 100644
  --- a/maths/miller_rabin.py
  +++ /dev/null
  @@ -1,51 +0,0 @@
  -import random
  -
  -from .binary_exp_mod import bin_exp_mod
  -
  -
  -# This is a probabilistic check to test primality, useful for big numbers!
  -# if it's a prime, it will return true
  -# if it's not a prime, the chance of it returning true is at most 1/4**prec
  -def is_prime_big(n, prec=1000):
  -    """
  -    >>> from maths.prime_check import is_prime
  -    >>> # all(is_prime_big(i) == is_prime(i) for i in range(1000))  # 3.45s
  -    >>> all(is_prime_big(i) == is_prime(i) for i in range(256))
  -    True
  -    """
  -    if n < 2:
  -        return False
  -
  -    if n % 2 == 0:
  -        return n == 2
  -
  -    # this means n is odd
  -    d = n - 1
  -    exp = 0
  -    while d % 2 == 0:
  -        d /= 2
  -        exp += 1
  -
  -    # n - 1=d*(2**exp)
  -    count = 0
  -    while count < prec:
  -        a = random.randint(2, n - 1)
  -        b = bin_exp_mod(a, d, n)
  -        if b != 1:
  -            flag = True
  -            for _ in range(exp):
  -                if b == n - 1:
  -                    flag = False
  -                    break
  -                b = b * b
  -                b %= n
  -            if flag:
  -                return False
  -            count += 1
  -    return True
  -
  -
  -if __name__ == "__main__":
  -    n = abs(int(input("Enter bound : ").strip()))
  -    print("Here's the list of primes:")
  -    print(", ".join(str(i) for i in range(n + 1) if is_prime_big(i)))
  
verification_info: {"golden_diff": "diff --git a/maths/miller_rabin.py b/maths/miller_rabin.py\ndeleted file mode 100644\n--- a/maths/miller_rabin.py\n+++ /dev/null\n@@ -1,51 +0,0 @@\n-import random\n-\n-from .binary_exp_mod import bin_exp_mod\n-\n-\n-# This is a probabilistic check to test primality, useful for big numbers!\n-# if it's a prime, it will return true\n-# if it's not a prime, the chance of it returning true is at most 1/4**prec\n-def is_prime_big(n, prec=1000):\n-    \"\"\"\n-    >>> from maths.prime_check import is_prime\n-    >>> # all(is_prime_big(i) == is_prime(i) for i in range(1000))  # 3.45s\n-    >>> all(is_prime_big(i) == is_prime(i) for i in range(256))\n-    True\n-    \"\"\"\n-    if n < 2:\n-        return False\n-\n-    if n % 2 == 0:\n-        return n == 2\n-\n-    # this means n is odd\n-    d = n - 1\n-    exp = 0\n-    while d % 2 == 0:\n-        d /= 2\n-        exp += 1\n-\n-    # n - 1=d*(2**exp)\n-    count = 0\n-    while count < prec:\n-        a = random.randint(2, n - 1)\n-        b = bin_exp_mod(a, d, n)\n-        if b != 1:\n-            flag = True\n-            for _ in range(exp):\n-                if b == n - 1:\n-                    flag = False\n-                    break\n-                b = b * b\n-                b %= n\n-            if flag:\n-                return False\n-            count += 1\n-    return True\n-\n-\n-if __name__ == \"__main__\":\n-    n = abs(int(input(\"Enter bound : \").strip()))\n-    print(\"Here's the list of primes:\")\n-    print(\", \".join(str(i) for i in range(n + 1) if is_prime_big(i)))\n", "issue": "Concatenate/consolidate all algorithms with different implementations\n### Feature description\n\nThere are lots of algorithms with the same concept but different implementations/methods in different files. All these should be moved into one file\n", "before_files": [{"content": "import random\n\nfrom .binary_exp_mod import bin_exp_mod\n\n\n# This is a probabilistic check to test primality, useful for big numbers!\n# if it's a prime, it will return true\n# if it's not a prime, the chance of it returning true is at most 1/4**prec\ndef is_prime_big(n, prec=1000):\n    \"\"\"\n    >>> from maths.prime_check import is_prime\n    >>> # all(is_prime_big(i) == is_prime(i) for i in range(1000))  # 3.45s\n    >>> all(is_prime_big(i) == is_prime(i) for i in range(256))\n    True\n    \"\"\"\n    if n < 2:\n        return False\n\n    if n % 2 == 0:\n        return n == 2\n\n    # this means n is odd\n    d = n - 1\n    exp = 0\n    while d % 2 == 0:\n        d /= 2\n        exp += 1\n\n    # n - 1=d*(2**exp)\n    count = 0\n    while count < prec:\n        a = random.randint(2, n - 1)\n        b = bin_exp_mod(a, d, n)\n        if b != 1:\n            flag = True\n            for _ in range(exp):\n                if b == n - 1:\n                    flag = False\n                    break\n                b = b * b\n                b %= n\n            if flag:\n                return False\n            count += 1\n    return True\n\n\nif __name__ == \"__main__\":\n    n = abs(int(input(\"Enter bound : \").strip()))\n    print(\"Here's the list of primes:\")\n    print(\", \".join(str(i) for i in range(n + 1) if is_prime_big(i)))\n", "path": "maths/miller_rabin.py"}]}