This is a follow up from gh-22376, where I forgot the sin/cos loops. CuPy noticed these in cupy/cupy#7243 and also found that arctan2 has the same issue.
For arctan2 this is actually a bug also leads to wrong results within NumPy (rather than only causing numba/cupy to be confused).
Just opening the issue in case 1.24.2 is around the corner, should fix it today in either case.