prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Wrong type coercion on input arguments
  If the following snippet, it looks like first calling the function with int arguments then coerces any further float arguments to int:
  
  ```
  >>> @jit(nopython=True)
  ... def mpow(a, b):
  ...     return math.pow(a, b)
  ... 
  >>> 
  >>> mpow(0, 1)
  0.0
  >>> mpow(0, 0.666)
  1.0
  >>> mpow(0, 1.666)
  0.0
  ```
  
  It doesn't happen if the function is called with float arguments first:
  
  ```
  >>> @jit(nopython=True)
  ... def mpow2(a, b):
  ...     return math.pow(a, b)
  ... 
  >>> mpow2(0, 0.666)
  0.0
  >>> mpow2(0, 1)
  0.0
  >>> mpow2(0, 0.666)
  0.0
  ```
  
  
  </issue>
  <code>
  [start of numba/typeconv/typeconv.py]
  1 from __future__ import print_function, absolute_import
  2 from . import _typeconv
  3 
  4 
  5 class TypeManager(object):
  6     def __init__(self):
  7         self._ptr = _typeconv.new_type_manager()
  8 
  9     def select_overload(self, sig, overloads):
  10         sig = [t._code for t in sig]
  11         overloads = [[t._code for t in s] for s in overloads ]
  12         return _typeconv.select_overload(self._ptr, sig, overloads)
  13 
  14     def check_compatible(self, fromty, toty):
  15         return _typeconv.check_compatible(self._ptr, fromty._code, toty._code)
  16 
  17     def set_compatible(self, fromty, toty, by):
  18         _typeconv.set_compatible(self._ptr, fromty._code, toty._code, by)
  19 
  20     def set_promote(self, fromty, toty):
  21         self.set_compatible(fromty, toty, ord("p"))
  22 
  23     def set_unsafe_convert(self, fromty, toty):
  24         self.set_compatible(fromty, toty, ord("u"))
  25 
  26     def set_safe_convert(self, fromty, toty):
  27         self.set_compatible(fromty, toty, ord("s"))
  28 
  29     def get_pointer(self):
  30         return _typeconv.get_pointer(self._ptr)
  31
  [end of numba/typeconv/typeconv.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/numba/typeconv/typeconv.py b/numba/typeconv/typeconv.py
  --- a/numba/typeconv/typeconv.py
  +++ b/numba/typeconv/typeconv.py
  @@ -6,10 +6,10 @@
       def __init__(self):
           self._ptr = _typeconv.new_type_manager()
   
  -    def select_overload(self, sig, overloads):
  +    def select_overload(self, sig, overloads, allow_unsafe):
           sig = [t._code for t in sig]
           overloads = [[t._code for t in s] for s in overloads ]
  -        return _typeconv.select_overload(self._ptr, sig, overloads)
  +        return _typeconv.select_overload(self._ptr, sig, overloads, allow_unsafe)
   
       def check_compatible(self, fromty, toty):
           return _typeconv.check_compatible(self._ptr, fromty._code, toty._code)
  
verification_info: {"golden_diff": "diff --git a/numba/typeconv/typeconv.py b/numba/typeconv/typeconv.py\n--- a/numba/typeconv/typeconv.py\n+++ b/numba/typeconv/typeconv.py\n@@ -6,10 +6,10 @@\n     def __init__(self):\n         self._ptr = _typeconv.new_type_manager()\n \n-    def select_overload(self, sig, overloads):\n+    def select_overload(self, sig, overloads, allow_unsafe):\n         sig = [t._code for t in sig]\n         overloads = [[t._code for t in s] for s in overloads ]\n-        return _typeconv.select_overload(self._ptr, sig, overloads)\n+        return _typeconv.select_overload(self._ptr, sig, overloads, allow_unsafe)\n \n     def check_compatible(self, fromty, toty):\n         return _typeconv.check_compatible(self._ptr, fromty._code, toty._code)\n", "issue": "Wrong type coercion on input arguments\nIf the following snippet, it looks like first calling the function with int arguments then coerces any further float arguments to int:\n\n```\n>>> @jit(nopython=True)\n... def mpow(a, b):\n...     return math.pow(a, b)\n... \n>>> \n>>> mpow(0, 1)\n0.0\n>>> mpow(0, 0.666)\n1.0\n>>> mpow(0, 1.666)\n0.0\n```\n\nIt doesn't happen if the function is called with float arguments first:\n\n```\n>>> @jit(nopython=True)\n... def mpow2(a, b):\n...     return math.pow(a, b)\n... \n>>> mpow2(0, 0.666)\n0.0\n>>> mpow2(0, 1)\n0.0\n>>> mpow2(0, 0.666)\n0.0\n```\n\n", "before_files": [{"content": "from __future__ import print_function, absolute_import\nfrom . import _typeconv\n\n\nclass TypeManager(object):\n    def __init__(self):\n        self._ptr = _typeconv.new_type_manager()\n\n    def select_overload(self, sig, overloads):\n        sig = [t._code for t in sig]\n        overloads = [[t._code for t in s] for s in overloads ]\n        return _typeconv.select_overload(self._ptr, sig, overloads)\n\n    def check_compatible(self, fromty, toty):\n        return _typeconv.check_compatible(self._ptr, fromty._code, toty._code)\n\n    def set_compatible(self, fromty, toty, by):\n        _typeconv.set_compatible(self._ptr, fromty._code, toty._code, by)\n\n    def set_promote(self, fromty, toty):\n        self.set_compatible(fromty, toty, ord(\"p\"))\n\n    def set_unsafe_convert(self, fromty, toty):\n        self.set_compatible(fromty, toty, ord(\"u\"))\n\n    def set_safe_convert(self, fromty, toty):\n        self.set_compatible(fromty, toty, ord(\"s\"))\n\n    def get_pointer(self):\n        return _typeconv.get_pointer(self._ptr)\n", "path": "numba/typeconv/typeconv.py"}]}