We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add erff and erfc to CUDA Targets
The erff and erfc family of functions are missing from the CUDA target.
Originally posted on the google-groups.
https://groups.google.com/a/continuum.io/forum/#!topic/numba-users/2wupabM4vJ4


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `numba/cuda/libdevice.py`
Content:
```
1 from __future__ import print_function, absolute_import, division
2 import sys
3 import math
4 from llvmlite.llvmpy.core import Type
5 from numba import cgutils, types
6 from numba.targets.imputils import Registry
7 
8 registry = Registry()
9 lower = registry.lower
10 
11 float_set = types.float32, types.float64
12 
13 
14 def bool_implement(nvname, ty):
15     def core(context, builder, sig, args):
16         assert sig.return_type == types.boolean, nvname
17         fty = context.get_value_type(ty)
18         lmod = builder.module
19         fnty = Type.function(Type.int(), [fty])
20         fn = lmod.get_or_insert_function(fnty, name=nvname)
21         result = builder.call(fn, args)
22         return context.cast(builder, result, types.int32, types.boolean)
23 
24     return core
25 
26 
27 
28 def unary_implement(nvname, ty):
29     def core(context, builder, sig, args):
30         fty = context.get_value_type(ty)
31         lmod = builder.module
32         fnty = Type.function(fty, [fty])
33         fn = lmod.get_or_insert_function(fnty, name=nvname)
34         return builder.call(fn, args)
35 
36     return core
37 
38 
39 def binary_implement(nvname, ty):
40     def core(context, builder, sig, args):
41         fty = context.get_value_type(ty)
42         lmod = builder.module
43         fnty = Type.function(fty, [fty, fty])
44         fn = lmod.get_or_insert_function(fnty, name=nvname)
45         return builder.call(fn, args)
46 
47     return core
48 
49 
50 def powi_implement(nvname):
51     def core(context, builder, sig, args):
52         [base, pow] = args
53         [basety, powty] = sig.args
54         lmod = builder.module
55         fty = context.get_value_type(basety)
56         ity = context.get_value_type(types.int32)
57         fnty = Type.function(fty, [fty, ity])
58         fn = lmod.get_or_insert_function(fnty, name=nvname)
59         return builder.call(fn, [base, pow])
60 
61 
62     return core
63 
64 
65 lower(math.pow, types.float32, types.int32)(powi_implement('__nv_powif'))
66 lower(math.pow, types.float64, types.int32)(powi_implement('__nv_powi'))
67 
68 
69 booleans = []
70 booleans += [('__nv_isnand', '__nv_isnanf', math.isnan)]
71 booleans += [('__nv_isinfd', '__nv_isinff', math.isinf)]
72 
73 unarys = []
74 unarys += [('__nv_ceil', '__nv_ceilf', math.ceil)]
75 unarys += [('__nv_floor', '__nv_floorf', math.floor)]
76 unarys += [('__nv_fabs', '__nv_fabsf', math.fabs)]
77 unarys += [('__nv_exp', '__nv_expf', math.exp)]
78 unarys += [('__nv_expm1', '__nv_expm1f', math.expm1)]
79 unarys += [('__nv_sqrt', '__nv_sqrtf', math.sqrt)]
80 unarys += [('__nv_log', '__nv_logf', math.log)]
81 unarys += [('__nv_log10', '__nv_log10f', math.log10)]
82 unarys += [('__nv_log1p', '__nv_log1pf', math.log1p)]
83 unarys += [('__nv_acosh', '__nv_acoshf', math.acosh)]
84 unarys += [('__nv_acos', '__nv_acosf', math.acos)]
85 unarys += [('__nv_cos', '__nv_cosf', math.cos)]
86 unarys += [('__nv_cosh', '__nv_coshf', math.cosh)]
87 unarys += [('__nv_asinh', '__nv_asinhf', math.asinh)]
88 unarys += [('__nv_asin', '__nv_asinf', math.asin)]
89 unarys += [('__nv_sin', '__nv_sinf', math.sin)]
90 unarys += [('__nv_sinh', '__nv_sinhf', math.sinh)]
91 unarys += [('__nv_atan', '__nv_atanf', math.atan)]
92 unarys += [('__nv_atanh', '__nv_atanhf', math.atanh)]
93 unarys += [('__nv_tan', '__nv_tanf', math.tan)]
94 unarys += [('__nv_tanh', '__nv_tanhf', math.tanh)]
95 
96 binarys = []
97 binarys += [('__nv_copysign', '__nv_copysignf', math.copysign)]
98 binarys += [('__nv_atan2', '__nv_atan2f', math.atan2)]
99 binarys += [('__nv_pow', '__nv_powf', math.pow)]
100 binarys += [('__nv_fmod', '__nv_fmodf', math.fmod)]
101 binarys += [('__nv_hypot', '__nv_hypotf', math.hypot)]
102 
103 
104 for name64, name32, key in booleans:
105     impl64 = bool_implement(name64, types.float64)
106     lower(key, types.float64)(impl64)
107     impl32 = bool_implement(name32, types.float32)
108     lower(key, types.float32)(impl32)
109 
110 
111 for name64, name32, key in unarys:
112     impl64 = unary_implement(name64, types.float64)
113     lower(key, types.float64)(impl64)
114     impl32 = unary_implement(name32, types.float32)
115     lower(key, types.float32)(impl32)
116 
117 for name64, name32, key in binarys:
118     impl64 = binary_implement(name64, types.float64)
119     lower(key, types.float64, types.float64)(impl64)
120     impl32 = binary_implement(name32, types.float32)
121     lower(key, types.float32, types.float32)(impl32)
122
```

Path: `numba/cuda/cudamath.py`
Content:
```
1 from __future__ import print_function, absolute_import, division
2 import math
3 from numba import types, utils
4 from numba.typing.templates import (AttributeTemplate, ConcreteTemplate,
5                                     signature, Registry)
6 
7 registry = Registry()
8 infer_global = registry.register_global
9 
10 
11 @infer_global(math.acos)
12 @infer_global(math.acosh)
13 @infer_global(math.asin)
14 @infer_global(math.asinh)
15 @infer_global(math.atan)
16 @infer_global(math.atanh)
17 @infer_global(math.ceil)
18 @infer_global(math.cos)
19 @infer_global(math.cosh)
20 @infer_global(math.degrees)
21 @infer_global(math.exp)
22 @infer_global(math.expm1)
23 @infer_global(math.fabs)
24 @infer_global(math.floor)
25 @infer_global(math.log)
26 @infer_global(math.log10)
27 @infer_global(math.log1p)
28 @infer_global(math.radians)
29 @infer_global(math.sin)
30 @infer_global(math.sinh)
31 @infer_global(math.sqrt)
32 @infer_global(math.tan)
33 @infer_global(math.tanh)
34 @infer_global(math.trunc)
35 class Math_unary(ConcreteTemplate):
36     cases = [
37         signature(types.float64, types.int64),
38         signature(types.float64, types.uint64),
39         signature(types.float32, types.float32),
40         signature(types.float64, types.float64),
41     ]
42 
43 
44 @infer_global(math.atan2)
45 class Math_atan2(ConcreteTemplate):
46     key = math.atan2
47     cases = [
48         signature(types.float64, types.int64, types.int64),
49         signature(types.float64, types.uint64, types.uint64),
50         signature(types.float32, types.float32, types.float32),
51         signature(types.float64, types.float64, types.float64),
52     ]
53 
54 
55 @infer_global(math.hypot)
56 class Math_hypot(ConcreteTemplate):
57     key = math.hypot
58     cases = [
59         signature(types.float64, types.int64, types.int64),
60         signature(types.float64, types.uint64, types.uint64),
61         signature(types.float32, types.float32, types.float32),
62         signature(types.float64, types.float64, types.float64),
63     ]
64 
65 
66 @infer_global(math.copysign)
67 @infer_global(math.fmod)
68 class Math_binary(ConcreteTemplate):
69     cases = [
70         signature(types.float32, types.float32, types.float32),
71         signature(types.float64, types.float64, types.float64),
72     ]
73 
74 
75 @infer_global(math.pow)
76 class Math_pow(ConcreteTemplate):
77     cases = [
78         signature(types.float32, types.float32, types.float32),
79         signature(types.float64, types.float64, types.float64),
80         signature(types.float32, types.float32, types.int32),
81         signature(types.float64, types.float64, types.int32),
82     ]
83 
84 
85 @infer_global(math.isinf)
86 @infer_global(math.isnan)
87 class Math_isnan(ConcreteTemplate):
88     cases = [
89         signature(types.boolean, types.int64),
90         signature(types.boolean, types.uint64),
91         signature(types.boolean, types.float32),
92         signature(types.boolean, types.float64),
93     ]
94
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/numba/cuda/cudamath.py b/numba/cuda/cudamath.py
--- a/numba/cuda/cudamath.py
+++ b/numba/cuda/cudamath.py
@@ -18,10 +18,14 @@
 @infer_global(math.cos)
 @infer_global(math.cosh)
 @infer_global(math.degrees)
+@infer_global(math.erf)
+@infer_global(math.erfc)
 @infer_global(math.exp)
 @infer_global(math.expm1)
 @infer_global(math.fabs)
 @infer_global(math.floor)
+@infer_global(math.gamma)
+@infer_global(math.lgamma)
 @infer_global(math.log)
 @infer_global(math.log10)
 @infer_global(math.log1p)
diff --git a/numba/cuda/libdevice.py b/numba/cuda/libdevice.py
--- a/numba/cuda/libdevice.py
+++ b/numba/cuda/libdevice.py
@@ -76,6 +76,10 @@
 unarys += [('__nv_fabs', '__nv_fabsf', math.fabs)]
 unarys += [('__nv_exp', '__nv_expf', math.exp)]
 unarys += [('__nv_expm1', '__nv_expm1f', math.expm1)]
+unarys += [('__nv_erf', '__nv_erff', math.erf)]
+unarys += [('__nv_erfc', '__nv_erfcf', math.erfc)]
+unarys += [('__nv_tgamma', '__nv_tgammaf', math.gamma)]
+unarys += [('__nv_lgamma', '__nv_lgammaf', math.lgamma)]
 unarys += [('__nv_sqrt', '__nv_sqrtf', math.sqrt)]
 unarys += [('__nv_log', '__nv_logf', math.log)]
 unarys += [('__nv_log10', '__nv_log10f', math.log10)]

{"golden_diff": "diff --git a/numba/cuda/cudamath.py b/numba/cuda/cudamath.py\n--- a/numba/cuda/cudamath.py\n+++ b/numba/cuda/cudamath.py\n@@ -18,10 +18,14 @@\n @infer_global(math.cos)\n @infer_global(math.cosh)\n @infer_global(math.degrees)\n+@infer_global(math.erf)\n+@infer_global(math.erfc)\n @infer_global(math.exp)\n @infer_global(math.expm1)\n @infer_global(math.fabs)\n @infer_global(math.floor)\n+@infer_global(math.gamma)\n+@infer_global(math.lgamma)\n @infer_global(math.log)\n @infer_global(math.log10)\n @infer_global(math.log1p)\ndiff --git a/numba/cuda/libdevice.py b/numba/cuda/libdevice.py\n--- a/numba/cuda/libdevice.py\n+++ b/numba/cuda/libdevice.py\n@@ -76,6 +76,10 @@\n unarys += [('__nv_fabs', '__nv_fabsf', math.fabs)]\n unarys += [('__nv_exp', '__nv_expf', math.exp)]\n unarys += [('__nv_expm1', '__nv_expm1f', math.expm1)]\n+unarys += [('__nv_erf', '__nv_erff', math.erf)]\n+unarys += [('__nv_erfc', '__nv_erfcf', math.erfc)]\n+unarys += [('__nv_tgamma', '__nv_tgammaf', math.gamma)]\n+unarys += [('__nv_lgamma', '__nv_lgammaf', math.lgamma)]\n unarys += [('__nv_sqrt', '__nv_sqrtf', math.sqrt)]\n unarys += [('__nv_log', '__nv_logf', math.log)]\n unarys += [('__nv_log10', '__nv_log10f', math.log10)]\n", "issue": "Add erff and erfc to CUDA Targets\nThe erff and erfc family of functions are missing from the CUDA target.\nOriginally posted on the google-groups.\nhttps://groups.google.com/a/continuum.io/forum/#!topic/numba-users/2wupabM4vJ4\n\n", "before_files": [{"content": "from __future__ import print_function, absolute_import, division\nimport sys\nimport math\nfrom llvmlite.llvmpy.core import Type\nfrom numba import cgutils, types\nfrom numba.targets.imputils import Registry\n\nregistry = Registry()\nlower = registry.lower\n\nfloat_set = types.float32, types.float64\n\n\ndef bool_implement(nvname, ty):\n    def core(context, builder, sig, args):\n        assert sig.return_type == types.boolean, nvname\n        fty = context.get_value_type(ty)\n        lmod = builder.module\n        fnty = Type.function(Type.int(), [fty])\n        fn = lmod.get_or_insert_function(fnty, name=nvname)\n        result = builder.call(fn, args)\n        return context.cast(builder, result, types.int32, types.boolean)\n\n    return core\n\n\n\ndef unary_implement(nvname, ty):\n    def core(context, builder, sig, args):\n        fty = context.get_value_type(ty)\n        lmod = builder.module\n        fnty = Type.function(fty, [fty])\n        fn = lmod.get_or_insert_function(fnty, name=nvname)\n        return builder.call(fn, args)\n\n    return core\n\n\ndef binary_implement(nvname, ty):\n    def core(context, builder, sig, args):\n        fty = context.get_value_type(ty)\n        lmod = builder.module\n        fnty = Type.function(fty, [fty, fty])\n        fn = lmod.get_or_insert_function(fnty, name=nvname)\n        return builder.call(fn, args)\n\n    return core\n\n\ndef powi_implement(nvname):\n    def core(context, builder, sig, args):\n        [base, pow] = args\n        [basety, powty] = sig.args\n        lmod = builder.module\n        fty = context.get_value_type(basety)\n        ity = context.get_value_type(types.int32)\n        fnty = Type.function(fty, [fty, ity])\n        fn = lmod.get_or_insert_function(fnty, name=nvname)\n        return builder.call(fn, [base, pow])\n\n\n    return core\n\n\nlower(math.pow, types.float32, types.int32)(powi_implement('__nv_powif'))\nlower(math.pow, types.float64, types.int32)(powi_implement('__nv_powi'))\n\n\nbooleans = []\nbooleans += [('__nv_isnand', '__nv_isnanf', math.isnan)]\nbooleans += [('__nv_isinfd', '__nv_isinff', math.isinf)]\n\nunarys = []\nunarys += [('__nv_ceil', '__nv_ceilf', math.ceil)]\nunarys += [('__nv_floor', '__nv_floorf', math.floor)]\nunarys += [('__nv_fabs', '__nv_fabsf', math.fabs)]\nunarys += [('__nv_exp', '__nv_expf', math.exp)]\nunarys += [('__nv_expm1', '__nv_expm1f', math.expm1)]\nunarys += [('__nv_sqrt', '__nv_sqrtf', math.sqrt)]\nunarys += [('__nv_log', '__nv_logf', math.log)]\nunarys += [('__nv_log10', '__nv_log10f', math.log10)]\nunarys += [('__nv_log1p', '__nv_log1pf', math.log1p)]\nunarys += [('__nv_acosh', '__nv_acoshf', math.acosh)]\nunarys += [('__nv_acos', '__nv_acosf', math.acos)]\nunarys += [('__nv_cos', '__nv_cosf', math.cos)]\nunarys += [('__nv_cosh', '__nv_coshf', math.cosh)]\nunarys += [('__nv_asinh', '__nv_asinhf', math.asinh)]\nunarys += [('__nv_asin', '__nv_asinf', math.asin)]\nunarys += [('__nv_sin', '__nv_sinf', math.sin)]\nunarys += [('__nv_sinh', '__nv_sinhf', math.sinh)]\nunarys += [('__nv_atan', '__nv_atanf', math.atan)]\nunarys += [('__nv_atanh', '__nv_atanhf', math.atanh)]\nunarys += [('__nv_tan', '__nv_tanf', math.tan)]\nunarys += [('__nv_tanh', '__nv_tanhf', math.tanh)]\n\nbinarys = []\nbinarys += [('__nv_copysign', '__nv_copysignf', math.copysign)]\nbinarys += [('__nv_atan2', '__nv_atan2f', math.atan2)]\nbinarys += [('__nv_pow', '__nv_powf', math.pow)]\nbinarys += [('__nv_fmod', '__nv_fmodf', math.fmod)]\nbinarys += [('__nv_hypot', '__nv_hypotf', math.hypot)]\n\n\nfor name64, name32, key in booleans:\n    impl64 = bool_implement(name64, types.float64)\n    lower(key, types.float64)(impl64)\n    impl32 = bool_implement(name32, types.float32)\n    lower(key, types.float32)(impl32)\n\n\nfor name64, name32, key in unarys:\n    impl64 = unary_implement(name64, types.float64)\n    lower(key, types.float64)(impl64)\n    impl32 = unary_implement(name32, types.float32)\n    lower(key, types.float32)(impl32)\n\nfor name64, name32, key in binarys:\n    impl64 = binary_implement(name64, types.float64)\n    lower(key, types.float64, types.float64)(impl64)\n    impl32 = binary_implement(name32, types.float32)\n    lower(key, types.float32, types.float32)(impl32)\n", "path": "numba/cuda/libdevice.py"}, {"content": "from __future__ import print_function, absolute_import, division\nimport math\nfrom numba import types, utils\nfrom numba.typing.templates import (AttributeTemplate, ConcreteTemplate,\n                                    signature, Registry)\n\nregistry = Registry()\ninfer_global = registry.register_global\n\n\n@infer_global(math.acos)\n@infer_global(math.acosh)\n@infer_global(math.asin)\n@infer_global(math.asinh)\n@infer_global(math.atan)\n@infer_global(math.atanh)\n@infer_global(math.ceil)\n@infer_global(math.cos)\n@infer_global(math.cosh)\n@infer_global(math.degrees)\n@infer_global(math.exp)\n@infer_global(math.expm1)\n@infer_global(math.fabs)\n@infer_global(math.floor)\n@infer_global(math.log)\n@infer_global(math.log10)\n@infer_global(math.log1p)\n@infer_global(math.radians)\n@infer_global(math.sin)\n@infer_global(math.sinh)\n@infer_global(math.sqrt)\n@infer_global(math.tan)\n@infer_global(math.tanh)\n@infer_global(math.trunc)\nclass Math_unary(ConcreteTemplate):\n    cases = [\n        signature(types.float64, types.int64),\n        signature(types.float64, types.uint64),\n        signature(types.float32, types.float32),\n        signature(types.float64, types.float64),\n    ]\n\n\n@infer_global(math.atan2)\nclass Math_atan2(ConcreteTemplate):\n    key = math.atan2\n    cases = [\n        signature(types.float64, types.int64, types.int64),\n        signature(types.float64, types.uint64, types.uint64),\n        signature(types.float32, types.float32, types.float32),\n        signature(types.float64, types.float64, types.float64),\n    ]\n\n\n@infer_global(math.hypot)\nclass Math_hypot(ConcreteTemplate):\n    key = math.hypot\n    cases = [\n        signature(types.float64, types.int64, types.int64),\n        signature(types.float64, types.uint64, types.uint64),\n        signature(types.float32, types.float32, types.float32),\n        signature(types.float64, types.float64, types.float64),\n    ]\n\n\n@infer_global(math.copysign)\n@infer_global(math.fmod)\nclass Math_binary(ConcreteTemplate):\n    cases = [\n        signature(types.float32, types.float32, types.float32),\n        signature(types.float64, types.float64, types.float64),\n    ]\n\n\n@infer_global(math.pow)\nclass Math_pow(ConcreteTemplate):\n    cases = [\n        signature(types.float32, types.float32, types.float32),\n        signature(types.float64, types.float64, types.float64),\n        signature(types.float32, types.float32, types.int32),\n        signature(types.float64, types.float64, types.int32),\n    ]\n\n\n@infer_global(math.isinf)\n@infer_global(math.isnan)\nclass Math_isnan(ConcreteTemplate):\n    cases = [\n        signature(types.boolean, types.int64),\n        signature(types.boolean, types.uint64),\n        signature(types.boolean, types.float32),\n        signature(types.boolean, types.float64),\n    ]\n", "path": "numba/cuda/cudamath.py"}], "after_files": [{"content": "from __future__ import print_function, absolute_import, division\nimport sys\nimport math\nfrom llvmlite.llvmpy.core import Type\nfrom numba import cgutils, types\nfrom numba.targets.imputils import Registry\n\nregistry = Registry()\nlower = registry.lower\n\nfloat_set = types.float32, types.float64\n\n\ndef bool_implement(nvname, ty):\n    def core(context, builder, sig, args):\n        assert sig.return_type == types.boolean, nvname\n        fty = context.get_value_type(ty)\n        lmod = builder.module\n        fnty = Type.function(Type.int(), [fty])\n        fn = lmod.get_or_insert_function(fnty, name=nvname)\n        result = builder.call(fn, args)\n        return context.cast(builder, result, types.int32, types.boolean)\n\n    return core\n\n\n\ndef unary_implement(nvname, ty):\n    def core(context, builder, sig, args):\n        fty = context.get_value_type(ty)\n        lmod = builder.module\n        fnty = Type.function(fty, [fty])\n        fn = lmod.get_or_insert_function(fnty, name=nvname)\n        return builder.call(fn, args)\n\n    return core\n\n\ndef binary_implement(nvname, ty):\n    def core(context, builder, sig, args):\n        fty = context.get_value_type(ty)\n        lmod = builder.module\n        fnty = Type.function(fty, [fty, fty])\n        fn = lmod.get_or_insert_function(fnty, name=nvname)\n        return builder.call(fn, args)\n\n    return core\n\n\ndef powi_implement(nvname):\n    def core(context, builder, sig, args):\n        [base, pow] = args\n        [basety, powty] = sig.args\n        lmod = builder.module\n        fty = context.get_value_type(basety)\n        ity = context.get_value_type(types.int32)\n        fnty = Type.function(fty, [fty, ity])\n        fn = lmod.get_or_insert_function(fnty, name=nvname)\n        return builder.call(fn, [base, pow])\n\n\n    return core\n\n\nlower(math.pow, types.float32, types.int32)(powi_implement('__nv_powif'))\nlower(math.pow, types.float64, types.int32)(powi_implement('__nv_powi'))\n\n\nbooleans = []\nbooleans += [('__nv_isnand', '__nv_isnanf', math.isnan)]\nbooleans += [('__nv_isinfd', '__nv_isinff', math.isinf)]\n\nunarys = []\nunarys += [('__nv_ceil', '__nv_ceilf', math.ceil)]\nunarys += [('__nv_floor', '__nv_floorf', math.floor)]\nunarys += [('__nv_fabs', '__nv_fabsf', math.fabs)]\nunarys += [('__nv_exp', '__nv_expf', math.exp)]\nunarys += [('__nv_expm1', '__nv_expm1f', math.expm1)]\nunarys += [('__nv_erf', '__nv_erff', math.erf)]\nunarys += [('__nv_erfc', '__nv_erfcf', math.erfc)]\nunarys += [('__nv_tgamma', '__nv_tgammaf', math.gamma)]\nunarys += [('__nv_lgamma', '__nv_lgammaf', math.lgamma)]\nunarys += [('__nv_sqrt', '__nv_sqrtf', math.sqrt)]\nunarys += [('__nv_log', '__nv_logf', math.log)]\nunarys += [('__nv_log10', '__nv_log10f', math.log10)]\nunarys += [('__nv_log1p', '__nv_log1pf', math.log1p)]\nunarys += [('__nv_acosh', '__nv_acoshf', math.acosh)]\nunarys += [('__nv_acos', '__nv_acosf', math.acos)]\nunarys += [('__nv_cos', '__nv_cosf', math.cos)]\nunarys += [('__nv_cosh', '__nv_coshf', math.cosh)]\nunarys += [('__nv_asinh', '__nv_asinhf', math.asinh)]\nunarys += [('__nv_asin', '__nv_asinf', math.asin)]\nunarys += [('__nv_sin', '__nv_sinf', math.sin)]\nunarys += [('__nv_sinh', '__nv_sinhf', math.sinh)]\nunarys += [('__nv_atan', '__nv_atanf', math.atan)]\nunarys += [('__nv_atanh', '__nv_atanhf', math.atanh)]\nunarys += [('__nv_tan', '__nv_tanf', math.tan)]\nunarys += [('__nv_tanh', '__nv_tanhf', math.tanh)]\n\nbinarys = []\nbinarys += [('__nv_copysign', '__nv_copysignf', math.copysign)]\nbinarys += [('__nv_atan2', '__nv_atan2f', math.atan2)]\nbinarys += [('__nv_pow', '__nv_powf', math.pow)]\nbinarys += [('__nv_fmod', '__nv_fmodf', math.fmod)]\nbinarys += [('__nv_hypot', '__nv_hypotf', math.hypot)]\n\n\nfor name64, name32, key in booleans:\n    impl64 = bool_implement(name64, types.float64)\n    lower(key, types.float64)(impl64)\n    impl32 = bool_implement(name32, types.float32)\n    lower(key, types.float32)(impl32)\n\n\nfor name64, name32, key in unarys:\n    impl64 = unary_implement(name64, types.float64)\n    lower(key, types.float64)(impl64)\n    impl32 = unary_implement(name32, types.float32)\n    lower(key, types.float32)(impl32)\n\nfor name64, name32, key in binarys:\n    impl64 = binary_implement(name64, types.float64)\n    lower(key, types.float64, types.float64)(impl64)\n    impl32 = binary_implement(name32, types.float32)\n    lower(key, types.float32, types.float32)(impl32)\n", "path": "numba/cuda/libdevice.py"}, {"content": "from __future__ import print_function, absolute_import, division\nimport math\nfrom numba import types, utils\nfrom numba.typing.templates import (AttributeTemplate, ConcreteTemplate,\n                                    signature, Registry)\n\nregistry = Registry()\ninfer_global = registry.register_global\n\n\n@infer_global(math.acos)\n@infer_global(math.acosh)\n@infer_global(math.asin)\n@infer_global(math.asinh)\n@infer_global(math.atan)\n@infer_global(math.atanh)\n@infer_global(math.ceil)\n@infer_global(math.cos)\n@infer_global(math.cosh)\n@infer_global(math.degrees)\n@infer_global(math.erf)\n@infer_global(math.erfc)\n@infer_global(math.exp)\n@infer_global(math.expm1)\n@infer_global(math.fabs)\n@infer_global(math.floor)\n@infer_global(math.gamma)\n@infer_global(math.lgamma)\n@infer_global(math.log)\n@infer_global(math.log10)\n@infer_global(math.log1p)\n@infer_global(math.radians)\n@infer_global(math.sin)\n@infer_global(math.sinh)\n@infer_global(math.sqrt)\n@infer_global(math.tan)\n@infer_global(math.tanh)\n@infer_global(math.trunc)\nclass Math_unary(ConcreteTemplate):\n    cases = [\n        signature(types.float64, types.int64),\n        signature(types.float64, types.uint64),\n        signature(types.float32, types.float32),\n        signature(types.float64, types.float64),\n    ]\n\n\n@infer_global(math.atan2)\nclass Math_atan2(ConcreteTemplate):\n    key = math.atan2\n    cases = [\n        signature(types.float64, types.int64, types.int64),\n        signature(types.float64, types.uint64, types.uint64),\n        signature(types.float32, types.float32, types.float32),\n        signature(types.float64, types.float64, types.float64),\n    ]\n\n\n@infer_global(math.hypot)\nclass Math_hypot(ConcreteTemplate):\n    key = math.hypot\n    cases = [\n        signature(types.float64, types.int64, types.int64),\n        signature(types.float64, types.uint64, types.uint64),\n        signature(types.float32, types.float32, types.float32),\n        signature(types.float64, types.float64, types.float64),\n    ]\n\n\n@infer_global(math.copysign)\n@infer_global(math.fmod)\nclass Math_binary(ConcreteTemplate):\n    cases = [\n        signature(types.float32, types.float32, types.float32),\n        signature(types.float64, types.float64, types.float64),\n    ]\n\n\n@infer_global(math.pow)\nclass Math_pow(ConcreteTemplate):\n    cases = [\n        signature(types.float32, types.float32, types.float32),\n        signature(types.float64, types.float64, types.float64),\n        signature(types.float32, types.float32, types.int32),\n        signature(types.float64, types.float64, types.int32),\n    ]\n\n\n@infer_global(math.isinf)\n@infer_global(math.isnan)\nclass Math_isnan(ConcreteTemplate):\n    cases = [\n        signature(types.boolean, types.int64),\n        signature(types.boolean, types.uint64),\n        signature(types.boolean, types.float32),\n        signature(types.boolean, types.float64),\n    ]\n", "path": "numba/cuda/cudamath.py"}]}