|Anonymous | Login||07-12-2020 10:47 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|
|Summary||0005693: ScaledDecimal printString truncates rather than rounds, giving some surprising results.|
When a floating point number is converted to ScaledDecimal, rounding erros can cause printString can give odd results, eg.
(1.23 asScaledDecimal:2) printString
Is this really what it should be doing?
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
(0008839 - 350 - 392 - 578 - 578 - 578 - 578)
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) [^]
Answer a string that is a valid literal representation that approximates the numeric value of the
Both rounding and truncating are compliant...
|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.