gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] Floating point arithmetics


From: Paul Pogonyshev
Subject: Re: [gnugo-devel] Floating point arithmetics
Date: Fri, 17 Sep 2004 00:00:45 -0200
User-agent: KMail/1.4.3

Arend wrote:

> > I rapidly concluded that there must be an underlying problem with the
> > connection code. And I strongly suspected floating point arithmetics.
> >
> > After some debugging, I could spot a location where things could (and
> > actually do) go wrong, in the ENQUEUE() macro. The first comparison
> > involves values which haven't been normalized, with the consequence that
> > the delta, vulnerable1 and vulnerable2 fields might (or might not) get
> > overwritten, leading to possible variations in the further processing
> > of the queue.
> >
> > point one (well, sort of). So I wrote a simple patch, just replacing
> > float declarations by int ones, and scaling all the constants by 10000
> > (smallest constant found in the ENQUEUE_STONE() macro).
>
> I think for 3.6, we should rather accept the platform dependency. While
> the patch is probably obvious, it is still big, and I feel a little
> unsafe about adding it so shortly before 3.6. (But that is just my
> opinion.)

Maybe we should use the EPSILON solution for 3.6 (at least in a few
places), since it is a small change.  Then we can maybe replace the
whole thing with fixed point arithmetics.

Paul





reply via email to

[Prev in Thread] Current Thread [Next in Thread]