"Christopher J. Demers" <
[hidden email]> wrote in
message news:akj7mg$1iov2a$
[hidden email]...
> If one inspects the code bellow one will find that the last element is
nil.
> (120.0 to: 135.0 by: 0.3) collect: [:temp | temp].
>
> The code bellow works as expected.
> (120.0s to: 135.0s by: 0.3s) collect: [:temp | temp].
>
> I roughly understand and accept the math issue. It has to do with the
> imprecise representation of floats in binary form. However I am not sure
if
> Dolphin should include nil as the last element in the first example. Is
> this a bug or feature?
Interval>>collect: is buggy. It is calculating the values by adding them up
instead of doing "start + (step * i)". If you remove the Interval>>collect:
method, then everything seems to work fine. SequenceableCollection>>collect:
uses the same method that #do: uses.
John Brant