Re: BUG #2211: select (1::float-1::float)*(-1) = -0 ??

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: "Tiago D(dot) J(dot)" <tiago(at)mdtestudio(dot)com(dot)br>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2211: select (1::float-1::float)*(-1) = -0 ??
Date: 2006-01-26 16:10:02
Message-ID: c2d9e70e0601260810s12d740f0q30b79b7490f89216@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 1/25/06, Tiago D. J. <tiago(at)mdtestudio(dot)com(dot)br> wrote:
>
> The following bug has been logged online:
>
> Bug reference: 2211
> Logged by: Tiago D. J.
> Email address: tiago(at)mdtestudio(dot)com(dot)br
> PostgreSQL version: 8.1
> Operating system: Slackware 10.2
> Description: select (1::float-1::float)*(-1) = -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=# 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=# 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 ;)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2006-01-26 16:15:08 Re: BUG #2213: lack of codepage Windows CP1257
Previous Message Tom Lane 2006-01-26 16:06:43 Re: BUG #2195: log_min_messages crash server when in DEBUG3 to 5