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

From Tom Lane
Subject Re: BUG #2211: select (1::float-1::float)*(-1) = -0 ??
Date
Msg-id 16754.1138292136@sss.pgh.pa.us
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
"Tiago D. J." <tiago@mdtestudio.com.br> writes:
> But run this query :
> select (1::float-1::float)*(-1)

> it returns -0

AFAIK this is correct behavior per the IEEE floating-point-math spec.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #2213: lack of codepage Windows CP1257
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #2214: release.sgml - Migration to version 8.1