Am 02.06.14 13:03, schrieb Sven Van Caekenberghe:
Apart from the class name, another issue is that 0.5s3 prints as 0.500s3 in Pharo, the trailing zeros are possibly not added everywhere.

Hmm, that looks strange to me. If you DisplayIt a 0.5s3 in VAST, you get 0.5. If you inspect it, it is debugPrint'ed as 0.5s3. I would tend to say that Pharo's display string is strange, not necessarily incorrect. I don't have access to the ANSI standard, but I guess the fact that there is the s3 already, which says there are 3 digits in the fraction part, alrady says enough.

Pharo does parse 0.5s3 correctly, so it can probably juist be accepted as a harmless weirdness. VAST, otoh, also parses 0.500s3 correctly, so it seems there is no harm done in exchange between VAST and Pharo. Not sure about VW, however.

Another question: doesn't creating a fraction when you parse a ScaledDecimal make life a bit harder than it should be in terms of CPU cycles burnt? Not that this matters for a few hundred or thousand numbers, but it might for large files.... Precision-wise there is no gain in it, right?

Joachim



--
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:jtuc...@objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1


Reply via email to