It seems `dpctl.tensor.tan` returns result which differs with numpy and Intel MKL: ```python import dpnp, numpy, dpctl, dpctl.tensor as dpt a = 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 used na = 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?
Activity
ndgrigorian commentedon Mar 27, 2025
@antonwolfy
Can you provide more information about the machine that you took this on?
I haven't been able to replicate it locally.
Update: my mistake, I missed that it was complex.
I can replicate it fine.
ndgrigorian commentedon May 5, 2026
Transferred as it is no longer relevant to dpctl