BUG FFI/unix vm ? Hackers help requested !

bouchet vincent vbouchet at gmail.com
Thu Jun 29 15:25:43 UTC 2006


Hi all,


I think to a "synchronisation" 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.)

2006/6/29, Dave Hylands <dhylands at gmail.com>:
>
> Hi Nicolas,
>
> > And on the seventh call, i always get a stange result (result is 0.0 but
> will
> > answer false to = 0.0).
>
> I don't know a whole lot about FFI, but I know that generally accepted
> practice (at least in C which is the language I'm most familiar with)
> is that you NEVER test for equality when using floating point numbers.
>
> You always use some small epsilon and test that the number you've got
> is within epsilon of the comparison number.
>
> This is because due to roundoff and other such effects, you can wind
> up with really tiny numbers, like 1 x 10^-53 which is essentially
> zero, but is not equal to zero.
>
> This might not even be relevant to your discussion, but seeing the
> equality test on 0.0 raised a red flag for me.
>
> --
> Dave Hylands
> Vancouver, BC, Canada
> http://www.DaveHylands.com/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060629/db541af7/attachment.htm


More information about the Squeak-dev mailing list