just a kick comment.<br>We use Fraction, no ScaledDecimal, no Float. We made some changes to fraction to work faster. We didn&#39;t see big performance diferences with ScaledDecimal.<br>We use measures to represent all type of quantities of some financial instrument. For example:
<br>100 dollars<br>100 IBM<br>100 bond (any bond)<br>etc.<br><br>Bye,<br>Hernan.<br><br><div class="gmail_quote">On Nov 22, 2007 5:50 PM, Sebastian Sastre &lt;<a href="mailto:ssastre@seaswork.com">ssastre@seaswork.com</a>
&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; -----Mensaje original-----<br><div class="Ih2E3d">&gt; De: <a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org">
squeak-dev-bounces@lists.squeakfoundation.org</a><br>&gt; [mailto:<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org">squeak-dev-bounces@lists.squeakfoundation.org</a>] En<br></div>&gt; nombre de Tom Phoenix<br>
&gt; Enviado el: Jueves, 22 de Noviembre de 2007 17:59<br><div class="Ih2E3d">&gt; Para: The general-purpose Squeak developers list<br>&gt; Asunto: Re: 5.3 printShowingDecimalPlaces: 2 displays &#39;5.29&#39;<br>&gt; insteadof&#39;
5.30&#39;<br>&gt;<br></div><div class="Ih2E3d">&gt; On 11/22/07, Sebastian Sastre &lt;<a href="mailto:ssastre@seaswork.com">ssastre@seaswork.com</a>&gt; wrote:<br>&gt;<br>&gt; &gt; Let&#39;s supose the user enters in some
<br>&gt; &gt; input widget with keyboard the &#39;5.30&#39; value. That will end<br>&gt; as a Float<br>&gt; &gt; at some point.<br>&gt;<br>&gt; Why will it?<br>&gt;<br>&gt; We&#39;re talking about monetary units. If you start with a
<br>&gt; string like &#39;5.30&#39;, meaning 530 monetary units, it won&#39;t &quot;end<br>&gt; as a Float&quot; all by itself. If somebody somewhere wrote code<br>&gt; that converted it to floating point, that&#39;s a bug.
<br>&gt;<br></div>Even if you don&#39;t use computers to achieve that, when you make monetary<br>values to pass trhough functions they *are* mathematically represented as<br>float numeric values. At some point we simplify presentations (like the
<br>balance books you mention) of the values.<br>I certainly agree with you about units. In fact there are equivalence units.<br>100 cents are 1 dollar, 4 quarters also are equal to 1 dollar and 100 cents.<br><br>Aconcagua framework seems to deal quite well with that trough it&#39;s Measures
<br>(and amount and a unit). For monetary measures I think I&#39;ll store scaled<br>decimal amounts to gain the accuracy you propose.<br><div class="Ih2E3d"><br>&gt; Don&#39;t be misled by what looks like a decimal point. If you&#39;re
<br>&gt; working with money, you don&#39;t want floating point, no matter<br>&gt; what your programming language. Floating point will lose tiny<br>&gt; bits due to roundoff; but money numbers are almost always<br>&gt; integral numbers of cents, and you don&#39;t want to lose any of
<br>&gt; them. Floating point may be needed to perform some<br>&gt; calculations along the way, but you&#39;ll use integers to get<br>&gt; the books to balance.<br>&gt;<br></div>I agree. With measures I think I&#39;ll be able to achieve that, by using scaled
<br>decimanls in the amounts of the measures, and the rounding will be performed<br>only in presentation time by the converter of the widget and not in the<br>internal process, formulas or calculation of the value.<br><br>
Cheers!<br><font color="#888888"><br>Sebastian<br></font><div><div></div><div class="Wj3C7c"><br><br>&gt; ObSqueak: 5.30 asFraction<br>&gt;<br>&gt; Cheers!<br>&gt;<br>&gt; --Tom Phoenix<br>&gt;<br><br><br></div></div></blockquote>
</div><br>