It seems dpctl.tensor.tan returns result which differs with numpy and Intel MKL:
importdpnp, numpy, dpctl, dpctl.tensorasdpta=numpy.array([11], dtype='F')
numpy.tan(a)
# Out: array([-225.95084+0.j], dtype=complex64)ia=dpnp.array(a, device='cpu')
dpnp.tan(ia)
# array([-225.95085+0.j], dtype=complex64) tan() from Intel MKL is usedna=dpt.asarray(a, device='cpu')
dpt.tan(da)
# Out: usm_ndarray([-225.68439+0.j], dtype=complex64)na=dpt.asarray(a, device='gpu')
dpt.tan(na)
# Out: usm_ndarray([-225.68439+0.j], dtype=complex64)# casting to complex128 resolve the issue:na=dpt.asarray(a, device='cpu', dtype='D')
dpt.tan(na)
# Out: usm_ndarray([-225.95084645+0.j])
Is the behavior expected? Or is there something which needs to be fixed in dpctl?
It seems
dpctl.tensor.tanreturns result which differs with numpy and Intel MKL:Is the behavior expected? Or is there something which needs to be fixed in dpctl?