Re: float8 comparison failure - Mailing list pgsql-bugs

From Tom Lane
Subject Re: float8 comparison failure
Date
Msg-id 29776.964797375@sss.pgh.pa.us
Whole thread Raw
In response to float8 comparison failure  (Radek Kanovsky <rk@dat.cz>)
List pgsql-bugs
Radek Kanovsky <rk@dat.cz> writes:
> [ float8 values that appear equal are not always equal ]

This is not a bug, it's an inherent consequence of the inaccuracy of
floating-point math.  Use some other data type (numeric, maybe) if
you expect to be able to do exact equality comparisons.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Radek Kanovsky
Date:
Subject: float8 comparison failure
Next
From: Lutz Birkhahn
Date:
Subject: postgresql-7.0.2: install-sh cannot install pgaccess