Why does numpy.sin return a different result if the argument size is greater than 8192?
I discovered that numpy.sin behaves differently when the argument size is <= 8192 and when it is > 8192. The difference is in both performance and values returned. Can someone explain this effect? For example, let's calculate sin(pi/4): x = np.pi*0.25 for n in range(8191, 8195): xx = np.repeat(x, n) %timeit np.sin(xx) print(n, np.sin(xx)[0]) 64.7 µs ± 194 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each) 8191 0.7071067811865476 64.6 µs ± 166 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each) 8192 0.7071067811865476 20.1 µs ± 189 ns per loop (mean ± std. dev. of 7 runs, 100000