You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pharo v9 through v12 overstates the size of (-4 to: 4 by: 0.1) Bug description
Since 0.1 is not exactly represented in FP, we should see only 80 elements in that interval. But, #size calculates as 81 rather than 80.
To Reproduce
| elements |
elements := OrderedCollection new.
-4 to: 4 by: 0.1 do: [ :i | elements add: i].
elements size
80
| elements |
elements := OrderedCollection new.
(-4 to: 4 by: 0.1) do: [ :i | elements add: i].
elements size
81
Expected behavior
#do: should enumerate the same 80 elements that #to:by:do: does.
Screenshots
If applicable, add screenshots to help explain your problem.
Version information:
OS: Windows
Version: 10 Pro
Pharo Version: 9 through 12, at least
Expected development cost
Expected to be small
The text was updated successfully, but these errors were encountered:
Pharo v9 through v12 overstates the size of (-4 to: 4 by: 0.1)
Bug description
Since 0.1 is not exactly represented in FP, we should see only 80 elements in that interval. But, #size calculates as 81 rather than 80.
To Reproduce
| elements |
elements := OrderedCollection new.
-4 to: 4 by: 0.1 do: [ :i | elements add: i].
elements size
80
| elements |
elements := OrderedCollection new.
(-4 to: 4 by: 0.1) do: [ :i | elements add: i].
elements size
81
Expected behavior
#do: should enumerate the same 80 elements that #to:by:do: does.
Screenshots
If applicable, add screenshots to help explain your problem.
Version information:
Expected development cost
Expected to be small
The text was updated successfully, but these errors were encountered: