[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] The killer heuristic
From: |
Dave Denholm |
Subject: |
Re: [gnugo-devel] The killer heuristic |
Date: |
26 Jan 2003 15:16:05 +0000 |
Arend Bayer <address@hidden> writes:
> Evan wrote:
>
> > Floating point rounding problems is an interesting thought... is there a
> > way to compile things to do IEEE floating point instead of platform
> > dependent, to test this out?
>
> Well gcc has an option -mieee-fp but I doubt this works.
>
> Try the example program below. I consistently get "not equal" as result
> (also with -mieee-fp). When compiling this with -O2, the executable
> float x = 1.0;
> float y = 1.0/3.0;
>
> if (x / 3.0 == y)
LHS is double, whereas RHS is float, so they don't have to be the same.
ie it's ((double)x / (double)3.0) == (double)(float)(1.0/3.0)
dd
--
address@hidden http://www.insignia.com
- Re: [gnugo-devel] The killer heuristic, (continued)
- Re: [gnugo-devel] The killer heuristic, bump, 2003/01/24
- Re: [gnugo-devel] The killer heuristic, Arend Bayer, 2003/01/25
- Re: [gnugo-devel] The killer heuristic, Evan Berggren Daniel, 2003/01/25
- Re: [gnugo-devel] The killer heuristic, Arend Bayer, 2003/01/25
- Re: [gnugo-devel] The killer heuristic, Evan Berggren Daniel, 2003/01/25
- Re: [gnugo-devel] The killer heuristic, Arend Bayer, 2003/01/25
- Re: [gnugo-devel] The killer heuristic, Evan Berggren Daniel, 2003/01/25
- Re: [gnugo-devel] The killer heuristic, Evan Berggren Daniel, 2003/01/25
- Re: [gnugo-devel] The killer heuristic,
Dave Denholm <=