On 4 September 2011 02:22, <span dir="ltr"><<a href="mailto:christoph.bumiller@speed.at">christoph.bumiller@speed.at</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
From: Christoph Bumiller <<a href="mailto:e0425955@student.tuwien.ac.at">e0425955@student.tuwien.ac.at</a>><br>
<br>
At least some of these divisions should fail on implementations<br>
that naively use 32 bit float division (without refinement).<br>
---<br>
generated_tests/builtin_function.py | 2 ++<br>
1 files changed, 2 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/generated_tests/builtin_function.py b/generated_tests/builtin_function.py<br>
index 4eca6c7..288aa75 100644<br>
--- a/generated_tests/builtin_function.py<br>
+++ b/generated_tests/builtin_function.py<br>
@@ -1003,6 +1003,7 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict):<br>
]<br>
uints = [np.uint32(x) for x in [0, 6, 12, 32, 74]]<br>
small_uints = [np.uint32(x) for x in [0, 1, 2, 5, 25, 31]]<br>
+ large_uints = [np.uint32(x) for x in [0xdeadbeef, 0xaffeaffe, 0xbadbad]]<br>
uvecs = [<br>
np.array([38, 35], dtype=np.uint32),<br>
np.array([64, 9], dtype=np.uint32),<br>
@@ -1132,6 +1133,7 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict):<br>
f('op-sub', 2, '1.10', lambda x, y: x - y, match_simple_binop, [floats+vecs+mats+ints+ivecs+uints+uvecs, floats+vecs+mats+ints+ivecs+uints+uvecs], template = '({0} - {1})')<br>
f('op-mult', 2, '1.10', _multiply, match_multiply, [floats+vecs+mats+ints+ivecs+uints+uvecs, floats+vecs+mats+ints+ivecs+uints+uvecs], template = '({0} * {1})')<br>
f('op-div', 2, '1.10', _divide, match_simple_binop, [floats+vecs+mats+ints+ivecs+uints+uvecs, floats+vecs+mats+ints+ivecs+uints+uvecs], template = '({0} / {1})')<br>
+ f('op-div-large', 2, '1.30', _divide, match_simple_binop, [large_uints, large_uints+small_uints], template = '({0} / {1})')<br>
f('op-mod', 2, '1.30', _divide, match_simple_binop, [ints+ivecs+uints+uvecs, ints+ivecs+uints+uvecs], template = '({0} / {1})')<br>
f('op-uplus', 1, '1.10', lambda x: +x, None, [floats+vecs+mats+ints+ivecs+uints+uvecs], template = '(+ {0})')<br>
f('op-neg', 1, '1.10', lambda x: -x, None, [floats+vecs+mats+ints+ivecs+uints+uvecs], template = '(- {0})')<br>
<font color="#888888">--<br>
1.7.3.4<br>
<br></font></blockquote><div><br>This patch looks good to me. I checked the new tests on my propriety nVidia Linux system, and they pass.<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
</div></div>