<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"><<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>></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>> Hi,<br>><br>> I'd like to print decimal Floats with at most n significant digits. E.g.<br>><br>> 123456 roundToSignificantDigits: 3<br>
> => 123000<br>> 0.00123456 roundToSignificantDigits: 3<br>> => 0.00123<br>><br>> Would this generally be useful? If so, what would a good selector be? And what a good implementation? Instead of rounding I'd be happy to just get a String.<br>
<br></div></div>IMO, if it isn't considered useful, then it *should* be ;) Having grown<br>up with slide rules, I'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>