SYSTEM WARNING: Creating default object from empty value

Mantis - Squeak
Viewing Issue Advanced Details
6455 Collections minor always 04-29-07 14:31 09-10-08 17:38
nicolas cellier  
 
normal  
closed  
duplicate  
none    
none  
0006455: [BUG] Interval includes: is weird
Try this:

(0 to: Float pi by: Float pi / 100) includes: Float pi * (3/100)

Answer is false.
I do agree with this result, because Float cannot be tested for equality due to inexact arithmetic.

However, if you look at includes: implementation, you will see some machinery intended to make the answer true is failing.
Why the code does not work:
--------------------------

Float pi * (3/100) / (Float pi /100) is (inexactly) 2.9999... , thus fractional part is greater than 1.0e-10 step.

Should behaviour be different from super ?
----------------------------------------

This is arguable...

(0 to: Float pi by: Float pi / 100) asArray includes: (Float pi * 14)/100.
  "is false"
(0 to: Float pi by: Float pi / 100) includes: (Float pi * 14)/100.
  "is true"
related to 0006456closed andreas [BUG] Interval of Float do: infinite loop 
child of 0007002new  The Mother of all issues involving interval 

Notes
(0010626)
nicolas cellier   
04-29-07 14:37   
While focusing on Float case, i did not see this:
code is completely broken for negative step, try:

(10 to: 1 by: -1) includes: 2. "answer is false..."

And this is exactly 0001603

(0012619)
nicolas cellier   
09-09-08 19:49   
Since this is a duplicate of 0001603, it should be closed.
(0012626)
KenCausey   
09-10-08 17:38   
closing duplicate, see 0001603