[XLA] Add another test case for complex division
PiperOrigin-RevId: 306861383 Change-Id: I0309309e4ea0162881fc819188f2fa042cf7ae9d
This commit is contained in:
parent
380feaac4d
commit
7c0fea00eb
@ -521,11 +521,19 @@ class BinaryOpsTest(xla_test.XLATestCase):
|
||||
|
||||
self._testBinary(
|
||||
gen_math_ops.real_div,
|
||||
np.array([3, 3j, -1.5j, -8, 2 + 3j, 2 + 4j], dtype=dtype),
|
||||
np.array([2, -2, 7j, -4j, 4 - 6j, 1 + 2j], dtype=dtype),
|
||||
expected=np.array(
|
||||
[1.5, -1.5j, -0.2142857, -2j, (2 + 3j) / (4 - 6j), 2],
|
||||
dtype=dtype))
|
||||
np.array(
|
||||
[3, 3j, -1.5j, -8, 2 + 3j, 2 + 4j, 9.663546088957395e-28 + 0j],
|
||||
dtype=dtype),
|
||||
np.array([
|
||||
2, -2, 7j, -4j, 4 - 6j, 1 + 2j,
|
||||
9.39511792677288e-16 - 1.529841108938729e-23j
|
||||
],
|
||||
dtype=dtype),
|
||||
expected=np.array([
|
||||
1.5, -1.5j, -0.2142857, -2j,
|
||||
(2 + 3j) / (4 - 6j), 2, 1.028571e-12 + 1.674859e-20j
|
||||
],
|
||||
dtype=dtype))
|
||||
|
||||
self._testBinary(
|
||||
math_ops.pow,
|
||||
|
Loading…
Reference in New Issue
Block a user