Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004378 [Squeak] Kernel minor always 08-04-06 01:15 04-18-10 22:05
Reporter nicolas cellier View Status public  
Assigned To andreas
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version trunk Product Version 3.9
  Product Build
Summary 0004378: ScaledDecimal storeString incorrectly use printOn: and loose exactness
Description "Both results should be 1.
ScaledDecimal representations are exact
(though only scale digits or fractional part are printed)"

self assert:
    (Compiler evaluate: (0.5s1 squared storeString)) * 4
    = (0.5s1 squared * 4)
Steps To Reproduce
Additional Information I signalled the bug to vwnc list and it was suggested to store as
1 / 4.0s1

storeString should be something like
('(' , faction numerator storeString , '/' , (fraction denominator storeString) , 's' , scale storeString , ')')

storeOn: aStream
  aStream
    nextPut: $(;
    store: fraction numerator;
    nextPut: $/;
    store: fraction denominator;
    nextPut: $s;
    store: scale;
    nextPut: $)
Attached Files  ScaledDecimal-storeOn-Test.1.cs [^] (457 bytes) 05-11-07 22:30
 ScaledDecimal-storeOn-Patch.1.cs [^] (394 bytes) 05-11-07 22:30
 ScaledDecimal-storeOn-M4378-nice-Patch.2.cs [^] (771 bytes) 12-03-07 20:10
 ScaledDecimal-storeOn-M4378-nice-Patch.3.cs [^] (938 bytes) 12-03-07 20:20
 ScaledDecimal-storeOn-M4378-Test.2.cs [^] (1,208 bytes) 12-03-07 20:35

- Relationships

SYSTEM WARNING: Creating default object from empty value

related to 0006696assigned andreas ScaledDecimal can read in base 16 but cannot print in base 16 
related to 0006482closed andreas [BUG] Interval storeOn: incorrect for some ScaledDecimal 

- Notes
(0010706 - 326 - 470 - 470 - 470 - 470 - 470)
nicolas cellier
05-11-07 22:24

Even if store patch is applied, a lot of methods implicitly rely on Number printOn: can be used in place of storeOn:

Example of wrong code:
    | interval1 interval2 |
    interval1 := (0 to: 1 by: 0.5s1 squared).
    interval2 := Compiler evaluate: interval1 storeString.
    {interval1 size. interval2 size}
will answer "#(5 6)"
 
(0011509 - 245 - 281 - 281 - 378 - 378 - 378)
nicolas cellier
12-03-07 20:09
edited on: 12-03-07 20:22

Ah, first patch could break some decompiler tests because ScaledDecimal would not storeOn: literaly.

A better patch is Patch.3.cs but it requires prerequisite patch from 0006796

(don't bother with Patch.2.cs, i forgot to accept the method)

 
(0011562 - 272 - 344 - 344 - 344 - 344 - 344)
Keith_Hodges
12-17-07 16:55
edited on: 01-18-08 09:38

"fix begin"
Installer mantis ensureFix: '6796 A ScaledDecimal is a literal but not isLiteral'.
Installer mantis bug: 4378 fix:'ScaledDecimal-storeOn-M4378-nice-Patch.3.cs'.
"fix test"
Installer mantis bug: 4378 fix:'ScaledDecimal-storeOn-M4378-Test.2.cs'.
"fix end"

 
(0013282 - 59 - 59 - 209 - 209 - 209 - 209)
nicolas cellier
08-24-09 20:20

Fixed in http://source.squeak.org/trunk/Kernel-nice.204.mcz [^]
 

- Issue History
Date Modified Username Field Change
08-04-06 01:15 nicolas cellier New Issue
05-11-07 22:24 nicolas cellier Note Added: 0010706
05-11-07 22:30 nicolas cellier File Added: ScaledDecimal-storeOn-Test.1.cs
05-11-07 22:30 nicolas cellier File Added: ScaledDecimal-storeOn-Patch.1.cs
09-25-07 01:19 matthewf Relationship added related to 0006696
09-25-07 01:22 matthewf Relationship added related to 0006482
12-03-07 20:09 nicolas cellier Note Added: 0011509
12-03-07 20:10 nicolas cellier File Added: ScaledDecimal-storeOn-M4378-nice-Patch.2.cs
12-03-07 20:20 nicolas cellier File Added: ScaledDecimal-storeOn-M4378-nice-Patch.3.cs
12-03-07 20:22 nicolas cellier Note Edited: 0011509
12-03-07 20:35 nicolas cellier File Added: ScaledDecimal-storeOn-M4378-Test.2.cs
12-17-07 16:55 Keith_Hodges Note Added: 0011562
12-17-07 17:09 Keith_Hodges Note Edited: 0011562
01-18-08 09:38 Keith_Hodges Note Edited: 0011562
01-10-09 00:02 Keith_Hodges Status new => testing
01-10-09 03:39 Keith_Hodges Status testing => resolved
01-10-09 03:39 Keith_Hodges Fixed in Version  => 3.11
01-10-09 03:39 Keith_Hodges Resolution open => fixed
01-10-09 03:39 Keith_Hodges Assigned To  => Keith_Hodges
01-10-09 03:41 Keith_Hodges Status resolved => testing
08-24-09 20:20 nicolas cellier Note Added: 0013282
10-03-09 19:33 Keith_Hodges Status testing => assigned
10-03-09 19:33 Keith_Hodges Assigned To Keith_Hodges => andreas
10-03-09 20:13 nicolas cellier Status assigned => resolved
10-03-09 20:13 nicolas cellier Fixed in Version 3.11 => trunk
04-18-10 22:05 andreas Status resolved => closed


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