Hi all, <br>
<br>
<br>
I think to a &quot;synchronisation&quot; problem : I remember similar problem
with c++ (in an other life) : The value is read before she was write.
(with a Transcript, or a debug screen, the execution speed is slower.)<br><br><div><span class="gmail_quote">2006/6/29, Dave Hylands &lt;<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Nicolas,<br><br>&gt; And on the seventh call, i always get a stange result (result is 0.0 but will<br>&gt; answer false to = 0.0).<br><br>I don't know a whole lot about FFI, but I know that generally accepted<br>practice (at least in C which is the language I'm most familiar with)
<br>is that you NEVER test for equality when using floating point numbers.<br><br>You always use some small epsilon and test that the number you've got<br>is within epsilon of the comparison number.<br><br>This is because due to roundoff and other such effects, you can wind
<br>up with really tiny numbers, like 1 x 10^-53 which is essentially<br>zero, but is not equal to zero.<br><br>This might not even be relevant to your discussion, but seeing the<br>equality test on 0.0 raised a red flag for me.
<br><br>--<br>Dave Hylands<br>Vancouver, BC, Canada<br><a href="http://www.DaveHylands.com/">http://www.DaveHylands.com/</a><br><br></blockquote></div><br>