[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] Loop Overflow Bug Fix
- From: Paige DePol <lual@...>
- Date: Sat, 18 Nov 2017 15:49:57 -0600
Coda Highland <chighland@gmail.com> wrote:
> On Sat, Nov 18, 2017 at 1:31 PM, Paige DePol <lual@serfnet.org> wrote:
>> At least with my patch one surprise is removed when using min/max integers,
>> and another when using floating loops and a step size magnitude that is
>> too small to properly affect the loop variables. Thinking about what Dirk
>> said as well, one final tweak could be done with floating loops by adding
>> half the step size to the loop limit variable to ensure the final iteration
>> is executed in the case where the floating precision drifts.
>
> Except that'll cause an EXTRA iteration to happen if you do something
> like `1, 9.9, 1`.
>
> /s/ Adam
Very true and obviously I must have misunderstood what the 'fix' was in the
other language then. Which means we're just back into the discussion about
floating-point tolerances. I will just stick with integers for my loops,
that way there is no worry about the cumulative floating point errors. ;)
~Paige
- References:
- [PATCH] Loop Overflow Bug Fix, Paige DePol
- Re: [PATCH] Loop Overflow Bug Fix, dyngeccetor8
- Re: [PATCH] Loop Overflow Bug Fix, Paige DePol
- Re: [PATCH] Loop Overflow Bug Fix, Paige DePol
- Re: [PATCH] Loop Overflow Bug Fix, Roberto Ierusalimschy
- Re: [PATCH] Loop Overflow Bug Fix, Paige DePol
- Re: [PATCH] Loop Overflow Bug Fix, Roberto Ierusalimschy
- Re: [PATCH] Loop Overflow Bug Fix, Paige DePol
- Re: [PATCH] Loop Overflow Bug Fix, Paige DePol
- Re: [PATCH] Loop Overflow Bug Fix, Dirk Laurie
- Re: [PATCH] Loop Overflow Bug Fix, Hisham
- Re: [PATCH] Loop Overflow Bug Fix, Coda Highland
- Re: [PATCH] Loop Overflow Bug Fix, KHMan
- Re: [PATCH] Loop Overflow Bug Fix, Paige DePol
- Re: [PATCH] Loop Overflow Bug Fix, Coda Highland