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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:15:36
Message-ID: 16754.1138292136@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Tiago D. J." <tiago(at)mdtestudio(dot)com(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2006-01-26 16:16:38 Re: BUG #2214: release.sgml - Migration to version 8.1
Previous Message Bruce Momjian 2006-01-26 16:15:08 Re: BUG #2213: lack of codepage Windows CP1257