Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006455 [Squeak] Collections minor always 04-29-07 14:31 09-10-08 17:38
Reporter nicolas cellier View Status public  
Assigned To
Priority normal Resolution duplicate  
Status closed   Product Version
Summary 0006455: [BUG] Interval includes: is weird
Description 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.
Additional Information 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"
Attached Files

- Relationships

SYSTEM WARNING: Creating default object from empty value

related to 0006456closed andreas [BUG] Interval of Float do: infinite loop 
child of 0007002new  The Mother of all issues involving interval 

- Notes
(0010626 - 188 - 240 - 240 - 240 - 240 - 240)
nicolas cellier
04-29-07 14:37
edited on: 04-29-07 14:41

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 - 56 - 56 - 56 - 143 - 143 - 143)
nicolas cellier
09-09-08 19:49

Since this is a duplicate of 0001603, it should be closed.
 
(0012626 - 28 - 28 - 28 - 115 - 115 - 115)
KenCausey
09-10-08 17:38

closing duplicate, see 0001603
 

- Issue History
Date Modified Username Field Change
04-29-07 14:31 nicolas cellier New Issue
04-29-07 14:31 nicolas cellier Status new => assigned
04-29-07 14:31 nicolas cellier Assigned To  => KenCausey
04-29-07 14:32 nicolas cellier Issue Monitored: nicolas cellier
04-29-07 14:32 nicolas cellier Issue End Monitor: nicolas cellier
04-29-07 14:37 nicolas cellier Note Added: 0010626
04-29-07 14:41 nicolas cellier Note Edited: 0010626
04-30-07 17:22 KenCausey Assigned To KenCausey =>
04-30-07 17:22 KenCausey Status assigned => new
04-30-07 17:22 KenCausey Category Any => Collections
09-09-08 19:49 nicolas cellier Note Added: 0012619
09-10-08 17:38 KenCausey Status new => closed
09-10-08 17:38 KenCausey Note Added: 0012626
09-10-08 17:38 KenCausey Resolution open => duplicate
10-03-09 20:29 nicolas cellier Relationship added related to 0006456
08-21-10 13:10 nicolas cellier Relationship added child of 0007002


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
65 total queries executed.
41 unique queries executed.
Powered by Mantis Bugtracker