I have a very weird problem in my raytracer. I have been following along with Ray Tracing in one Weekend by Peter Shirley. I have a very weird problem with artifacts in my renders. This is an image of the artifacts (I moved one sphere so that it is easy to see):
This has been a big problem, and I can't quite figure out why it is like so. I ran some tests and found out that this is not because of normal calculations, or random floating point calculations. I am just starting to learn computer graphics, and would like some help with this. If anybody had a similar problem, please tell me how I could fix it.