Fixed floating point strides

In case you haven’t noticed, Xiaodi Wu fixed floating point strides in the latest version of Swift.

You can read about the background of the problem here but to tl;dr summarize it, the traditional C for-loop had a big problem with floating point progressions. Errors accumulated the longer the loop ran. That problem then passed into Swift strides.

This issue is now fixed and the error at the end of stride(from:0.0, through: 1.0, by: 0.05) is now no larger than it was at the start. Yay!

Comments are closed.