<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><font class="">I have a problem with the way floating point ranges work with striding:</font></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><font class=""><font face="Courier" class="">1.0.stride(through: 2.0, by: 0.1)</font></font><span style="font-family: Palatino-Roman;" class="">&nbsp;returns the sequence&nbsp;[1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]. &nbsp;</span></blockquote><blockquote class="" style="font-family: Palatino-Roman; margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div class=""><i class="">Documentation: "It returns the sequence where last is less than or equal to `end`."&nbsp;</i></div></blockquote><font face="Palatino-Roman" class=""><div class="">(And yes, the same issue exists with tradition C-style for loops).</div></font><div class="" style="font-family: Palatino-Roman;"><div class=""><br class=""></div><div class="">Would it be really horrible if the implementation and definition was changed to: &nbsp;</div></div><blockquote class="" style="font-family: Palatino-Roman; margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div class=""><div class=""><i class="">"It returns the sequence where last is greater than or equal to `end`?"</i></div></div></blockquote><div class="" style="font-family: Palatino-Roman;"><div class="">This would offer no change for integers, and include 2.0 for floating point sequences.&nbsp;</div><div class=""><br class=""></div><div class="">Alternatively, could there be&nbsp;<font face="Courier" class="">decimalStride</font>? Using Double but a rounding system with a fixed number of decimal places (e.g. 1, 2, 3), to ensure at least the end point is hit? It might look like:</div><div class=""><blockquote style="font-family: Palatino; margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><font class=""><font face="Courier" class="">1.0.stride(through: 2.0, by: 0.1, places: 1)</font></font></blockquote><blockquote class="" style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"></blockquote></div><div class=""><br class=""></div><div class="">I know there have been several discussions on-list about decimal number systems (<a href="http://article.gmane.org/gmane.comp.lang.swift.evolution/7130/match=decimal" class="">Re: Is there a need for a Decimal type?</a>) as well, but this could fix an ongoing annoyance without a major change.</div><div class=""><br class=""></div><div class="">Thanks for your thoughts,</div><div class=""><br class=""></div><div class="">-- Erica</div><div class=""><br class=""></div></div></body></html>