<html><head></head><body>My understanding is that it was intended to support enumerations where you write the exact end point, like [1.0, 1.1 .. 2.3]<br>
<br>
Because of floating point quirks, this could end up generating a value close to 2.3 that's slightly larger than the value close to 2.3 constructed by directly converting the decimal expression into a floating point number. You need to allow some "slack" in the upper bound to guarantee a value close to the written end point appears in the list. Increasing the bound by half a delta means there will be something close to 2.3 in the list, and shouldn't go far enough to include the next greater element generated.<br>
<br>
I suppose by that reasoning you're "not supposed" to use enumerations like [1.0, 3 .. 4], because 4 isn't the idealised mathematical endpoint of the sequence.<br>
<br><br><div class="gmail_quote">On October 20, 2016 6:24:29 AM GMT+11:00, Brandon Allbery <allbery.b@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 19, 2016 at 8:13 AM, Bence Kodaj <span dir="ltr"><<a href="mailto:bence.kodaj@gmail.com" target="_blank">bence.kodaj@gmail.com</a>></span> wrote:<br /><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Does anybody happen to know why [1.0, 3 ..4 ] is [1.0, 3.0, 5.0] ?</div></div></blockquote><div><br /></div><div>Nobody seems to know, aside from "that's what the Libraries part of the Report says". You'd probably have to find the committee that added it to the Report (good luck...) to learn their logic. (The quirks of FP arithmetic don't seem to be involved, since the overshoot is overkill for that.)</div></div><div><br /></div>-- <br /><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a
href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />Haskell-Cafe mailing list<br />To (un)subscribe, modify options or view archives go to:<br /><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br />Only members subscribed via the mailman list are allowed to post.</pre></blockquote></div></body></html>