Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006796 [Squeak] Kernel minor always 12-03-07 19:07 04-18-10 22:04
Reporter nicolas cellier View Status public  
Assigned To nicolas cellier
Priority normal Resolution fixed  
Status closed   Product Version 3.10
Summary 0006796: A ScaledDecimal is a literal but not isLiteral
Description self assert: 0.02s2 isLiteral.

"obviously, isn't it?"
Additional Information
Attached Files  ScaledDecimal-isLiteral-M6796-nice-Test.1.cs [^] (1,001 bytes) 12-03-07 19:45
 ScaledDecimal-isLiteral-M6796-nice-Patch.1.cs [^] (1,105 bytes) 12-03-07 19:46

- Relationships

- Notes
(0011506 - 81 - 81 - 81 - 81 - 81 - 81)
nicolas cellier
12-03-07 19:10

Hem, Ken, do i win medal for worse-behaved reporter? classify Kernel of course...
 
(0011507 - 39 - 39 - 39 - 39 - 39 - 39)
KenCausey
12-03-07 19:35

You are working hard at it at least. ;)
 
(0011508 - 356 - 392 - 392 - 741 - 741 - 741)
nicolas cellier
12-03-07 19:54

Less obvious is (1/3.00s2). Since ScaledDecimal retain infinite precision, it cannot store literaly but with an infinite number of digits.

So it would not make a good literal.
I propose in test and patch that it answer false for this reason.

Note that this is connected to 0004378 and 0006482.
So a better patch to 0004378 could now use isLiteral test...
 
(0011511 - 157 - 169 - 169 - 169 - 169 - 169)
nicolas cellier
12-03-07 21:32

However, just thought of this one: 0.001s1 can be represented as a literal, but won't print as isSelfEvaluating... (it will print '0.0s1')

This is tricky.
 
(0011515 - 487 - 549 - 549 - 549 - 549 - 549)
nicolas cellier
12-04-07 09:27

Since Squeak accept ScaledDecimals literals input in other bases, (1/3.0s2) has a literal representation finally:

    3r0.10s2

We can print up to base 36... meaning we can represent denominators that can be decomposed in the form a1^n1 * ... * ap^np
where (a1...aP) tuple can be any of (0) (1) (2) (3) (5) (2,3) (7) (2,5) (11) (13) (2,7) (3,5) (17) (19) (3,7) (2,11) (23) (2,13) (29) (2,3,5) (31) (3,11) (2,17) (5,7)

Well, sure that's not really original meaning of deci-mal...
 
(0011561 - 197 - 263 - 263 - 263 - 263 - 263)
Keith_Hodges
12-17-07 16:51
edited on: 12-17-07 17:09

"fix begin"
Installer mantis bug: 6796 fix:'ScaledDecimal-isLiteral-M6796-nice-Patch.1.cs'.
"fix test"
Installer mantis bug: 6796 fix:'ScaledDecimal-isLiteral-M6796-nice-Test.1.cs'.
"fix end"

 
(0013301 - 75 - 75 - 75 - 75 - 75 - 75)
nicolas cellier
09-12-09 20:11

This appears to be already fixed in trunk, don't know exactly in which .mcz
 

- Issue History
Date Modified Username Field Change
12-03-07 19:07 nicolas cellier New Issue
12-03-07 19:07 nicolas cellier Status new => assigned
12-03-07 19:07 nicolas cellier Assigned To  => KenCausey
12-03-07 19:10 nicolas cellier Note Added: 0011506
12-03-07 19:35 KenCausey Note Added: 0011507
12-03-07 19:35 KenCausey Assigned To KenCausey =>
12-03-07 19:35 KenCausey Status assigned => new
12-03-07 19:35 KenCausey Category Any => Kernel
12-03-07 19:35 KenCausey Description Updated
12-03-07 19:45 nicolas cellier File Added: ScaledDecimal-isLiteral-M6796-nice-Test.1.cs
12-03-07 19:46 nicolas cellier File Added: ScaledDecimal-isLiteral-M6796-nice-Patch.1.cs
12-03-07 19:54 nicolas cellier Note Added: 0011508
12-03-07 21:32 nicolas cellier Note Added: 0011511
12-04-07 09:27 nicolas cellier Note Added: 0011515
12-17-07 16:51 Keith_Hodges Note Added: 0011561
12-17-07 16:52 Keith_Hodges Note Edited: 0011561
12-17-07 17:09 Keith_Hodges Note Edited: 0011561
01-10-09 02:00 Keith_Hodges Status new => pending
01-10-09 03:27 Keith_Hodges Status pending => 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
09-12-09 20:11 nicolas cellier Note Added: 0013301
10-03-09 19:33 Keith_Hodges Status testing => assigned
10-03-09 19:33 Keith_Hodges Assigned To Keith_Hodges => andreas
10-04-09 19:05 nicolas cellier Status assigned => resolved
10-04-09 19:05 nicolas cellier Fixed in Version 3.11 => trunk
10-05-09 16:36 KenCausey Assigned To andreas => nicolas cellier
04-18-10 22:04 andreas Status resolved => closed


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