On Mon, 2002-08-12 at 15:24, Tim Ellis wrote:
> > ciudadela=# select 0.2-0.2;
> > 0
> > ciudadela=# select 0.2-0.21;
> > -0.00999999999999998
> > ciudadela=# select 0.21-0.22;
> > -0.01
>
> I also get this on my Postgres 7.2.1, both Linux and Solaris.
You are comparing floats.
This is a STANDARD problem with Base 10 Floating point.
LER
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749