<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hehe thanks for the vivid response ;)<div>Well then I'll use closeTo, I don't really need a very accurate comparison.</div><div>But since I want to create a Renderer the performance will be the biggest</div><div>problem. Well thats also why I've chosen Squeak ;).</div><div><br></div><div><br></div><div>thanks for the responses<br><div><br></div><div><br><div><div>Am 27.02.2009 um 13:51 schrieb Bert Freudenberg:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>The Epsilon class variable is used only when the primitives for some float functions are not available, in which case they are approximated to that precision. Using that same epsilon for something else is as meaningless as the 0.0001 in #closeTo:.<br><br>The epsilon really depends on your application.<br><br>- Bert -<br><br>On 27.02.2009, at 13:41, Oscar Nierstrasz wrote:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">Yes, we looked at that, but closeTo: uses a much larger epsilon than Float's class variable Epsilon.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I suggested Camillo wrote an extension method similar to closeTo: but using the existing Epsilon (or an arbitrary one as an additional parameter).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Is that the right thing to do?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- on<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Feb 27, 2009, at 13:34, Lukas Renggli wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi Camillo ;-)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Use the method #closeTo: instead of #=. Comparing floats with #=<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">almost never works.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Although "(Float halfPi / 2) tan" is printed as 1.0, it is not exactly<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">1.0 due to rounding errors in the calucaltaion and/or the internal<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">representation.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;(Float halfPi / 2) tan - 1.0 --&gt; -1.110223024625156e-16<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Lukas<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-- <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Lukas Renggli<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.lukas-renggli.ch">http://www.lukas-renggli.ch</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Beginners mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Beginners mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br></blockquote><br><br><br>_______________________________________________<br>Beginners mailing list<br><a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br></div></blockquote></div><br></div></div></body></html>