Re: BUG #2211: select (1::float-1::float)*(-1) = -0 ?? - Mailing list pgsql-bugs

From Jaime Casanova
Subject Re: BUG #2211: select (1::float-1::float)*(-1) = -0 ??
Date
Msg-id c2d9e70e0601260810s12d740f0q30b79b7490f89216@mail.gmail.com
Whole thread Raw
In response to BUG #2211: select (1::float-1::float)*(-1) = -0 ??  ("Tiago D. J." <tiago@mdtestudio.com.br>)
List pgsql-bugs
On 1/25/06, Tiago D. J. <tiago@mdtestudio.com.br> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      2211
> Logged by:          Tiago D. J.
> Email address:      tiago@mdtestudio.com.br
> PostgreSQL version: 8.1
> Operating system:   Slackware 10.2
> Description:        select (1::float-1::float)*(-1) =3D -0 ??
> Details:
>
> Hi people,
> I think that anything * 0, or 0*anything should be zero.
> But run this query :
> select (1::float-1::float)*(-1)
>
> it returns -0
>
> Sorry, my english is so poor,
> I hope that i'm helping you with this information.
>
> Tiago
>

pruebas=3D# select version();
                                         version

---------------------------------------------------------------------------=
---------------
 PostgreSQL 8.1.1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)
(1 fila)


pruebas=3D# select (1::float-1::float)*(-1);
 ?column?
----------
        0
(1 fila)


This is good for me... maybe a bug already fixed?

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2195: log_min_messages crash server when in DEBUG3 to 5
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #2213: lack of codepage Windows CP1257