<div>We have a issue in Etoys where this bites us.</div>
<div>We get a huge float instead of a expected zero.</div>
<div><a href="http://tracker.squeakland.org/browse/SQ-946">http://tracker.squeakland.org/browse/SQ-946</a></div>
<div> </div>
<div>Karl</div>
<div> </div>
<div> </div>
<div class="gmail_quote">On Thu, Aug 4, 2011 at 2:20 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.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">
<div>
<div></div>
<div class="h5">On Thu, Aug 04, 2011 at 11:20:41AM +0200, Bert Freudenberg wrote:<br>&gt; Hi,<br>&gt;<br>&gt; I&#39;d like to print decimal Floats with at most n significant digits. E.g.<br>&gt;<br>&gt;       123456 roundToSignificantDigits: 3<br>
&gt;       =&gt; 123000<br>&gt;       0.00123456 roundToSignificantDigits: 3<br>&gt;       =&gt; 0.00123<br>&gt;<br>&gt; Would this generally be useful? If so, what would a good selector be? And what a good implementation? Instead of rounding I&#39;d be happy to just get a String.<br>
<br></div></div>IMO, if it isn&#39;t considered useful, then it *should* be ;) Having grown<br>up with slide rules, I&#39;m always annoyed by display of numbers with more<br>precision than is physically possible or computationally meaningful.<br>
So +1 from me.<br><br>Answering a String seems good, because the typical use case would<br>be to display a number to some number of significant digits, but<br>not to change the value of the number itself.<br><br>Dave<br><br>
<br></blockquote></div><br>