Author: Richard Plangger <[email protected]>
Branch: ppc-vsx-support
Changeset: r85239:5450d2d80935
Date: 2016-06-20 12:19 +0200
http://bitbucket.org/pypy/pypy/changeset/5450d2d80935/
Log: added micronumpy's division func to the test
diff --git a/rpython/jit/metainterp/test/test_vector.py
b/rpython/jit/metainterp/test/test_vector.py
--- a/rpython/jit/metainterp/test/test_vector.py
+++ b/rpython/jit/metainterp/test/test_vector.py
@@ -75,9 +75,19 @@
type_system=self.type_system,
vec=vec, vec_all=vec_all)
+ @staticmethod
+ def rdiv(v1,v2):
+ try:
+ return v1 / v2
+ except ZeroDivisionError:
+ if v1 == v2 == 0.0:
+ return rfloat.NAN
+ return rfloat.copysign(rfloat.INFINITY, v1 * v2)
+
@given(data=st.data())
@pytest.mark.parametrize('func', [lambda a,b: a+b,
- lambda a,b: a*b, lambda a,b: a-b, lambda a,b: a / b])
+ lambda a,b: a*b, lambda a,b: a-b,
+ lambda a,b: VectorizeTests.rdiv(a,b)])
def test_vector_simple_float(self, func, data):
func = always_inline(func)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit