Anonymous | Login | 02-27-2021 21:37 UTC |
Main | My View | View Issues | Change Log | Docs |
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 |
![]() ![]() |
||||||||
|
![]() |
|
(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 |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
90 total queries executed. 48 unique queries executed. |