BUG #2211: select (1::float-1::float)*(-1) = -0 ??
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) = -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
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) = -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 ;)