Strange sphere reflection effects in ray tracing project. I cannot figure out what causes them
The issue was caused by an incorrect calculation of the reflection direction vector.
With D ray direction and N the normal vector:

R = D - 2 * dot(D, N) * N


The issue was caused by calculating the components of R as follows:

R[i] = D[i] - 2 * (D[i] * N[i]) * N[i]


It took me a while to find the mistake because this produced a correct reflection with the horizontal plane.