Anonymous | Login | 12-06-2019 12:59 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 | |||||||
0005693 | [Squeak] Kernel | minor | always | 01-02-07 13:38 | 01-06-07 03:32 | |||||||
Reporter | robdavid | View Status | public | |||||||||
Assigned To | ||||||||||||
Priority | normal | Resolution | open | |||||||||
Status | new | Product Version | 3.9 | |||||||||
Summary | 0005693: ScaledDecimal printString truncates rather than rounds, giving some surprising results. | |||||||||||
Description |
When a floating point number is converted to ScaledDecimal, rounding erros can cause printString can give odd results, eg. (1.23 asScaledDecimal:2) printString gives "1.22s2" Is this really what it should be doing? |
|||||||||||
Additional Information |
Questions over issue seem to have existed when ScaledDecimal was written; ScaledDecimalTest<<testPrintString contains the comment: "The printed representation of a ScaledDecimal is truncated, not rounded. Not sure if this is right, so this test describes the current Squeak implementation. If someone knows a reason that rounding would be preferable, then update this test." |
|||||||||||
Attached Files | ||||||||||||
|
![]() |
||||||
|
![]() |
|
(0008839 - 350 - 392 - 578 - 578 - 578 - 578) nicolas cellier 01-06-07 03:32 |
For information, both VW and Dolphin do a rounded print. didn't see much about printString in the standard... (http://wiki.squeak.org/squeak/uploads/172/standard_v1_9-indexed.pdf) [^] except: Answer a string that is a valid literal representation that approximates the numeric value of the receiver. Both rounding and truncating are compliant... |
![]() |
|||
Date Modified | Username | Field | Change |
01-02-07 13:38 | robdavid | New Issue | |
01-06-07 03:32 | nicolas cellier | Note Added: 0008839 | |
09-25-07 01:20 | matthewf | Relationship added | related to 0006696 |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
39 total queries executed. 31 unique queries executed. |