<div>Hi</div>
<div>ScaledDecimal is not in the Etoy image :-(</div>
<div>Licence issue I think...</div>
<div>I&#39;ll use the printShowingDecimalPlaces: </div>
<div>Thank you</div>
<div> </div>
<div>Karl<br><br></div>
<div class="gmail_quote">On Thu, Aug 4, 2011 at 3:12 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I see two workaround if you know the increment is 0.01<br>1) use a ScaledDecimal rather than a Float with 2 decimal places.<br>
2) use printShowingDecimalPlaces: 2 to render the morph<br><br>Nicolas<br><br>2011/8/4 karl ramberg &lt;<a href="mailto:karlramberg@gmail.com">karlramberg@gmail.com</a>&gt;:<br>
<div>
<div></div>
<div class="h5">&gt; We have a issue in Etoys where this bites us.<br>&gt; We get a huge float instead of a expected zero.<br>&gt; <a href="http://tracker.squeakland.org/browse/SQ-946" target="_blank">http://tracker.squeakland.org/browse/SQ-946</a><br>
&gt;<br>&gt; Karl<br>&gt;<br>&gt;<br>&gt; On Thu, Aug 4, 2011 at 2:20 PM, David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; On Thu, Aug 04, 2011 at 11:20:41AM +0200, Bert Freudenberg wrote:<br>
&gt;&gt; &gt; Hi,<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; I&#39;d like to print decimal Floats with at most n significant digits. E.g.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;       123456 roundToSignificantDigits: 3<br>&gt;&gt; &gt;       =&gt; 123000<br>
&gt;&gt; &gt;       0.00123456 roundToSignificantDigits: 3<br>&gt;&gt; &gt;       =&gt; 0.00123<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Would this generally be useful? If so, what would a good selector be?<br>&gt;&gt; &gt; And what a good implementation? Instead of rounding I&#39;d be happy to just get<br>
&gt;&gt; &gt; a String.<br>&gt;&gt;<br>&gt;&gt; IMO, if it isn&#39;t considered useful, then it *should* be ;) Having grown<br>&gt;&gt; up with slide rules, I&#39;m always annoyed by display of numbers with more<br>&gt;&gt; precision than is physically possible or computationally meaningful.<br>
&gt;&gt; So +1 from me.<br>&gt;&gt;<br>&gt;&gt; Answering a String seems good, because the typical use case would<br>&gt;&gt; be to display a number to some number of significant digits, but<br>&gt;&gt; not to change the value of the number itself.<br>
&gt;&gt;<br>&gt;&gt; Dave<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br><br></div></div></blockquote></div><br>