Skip site navigation (1) Skip section navigation (2)

Re: float8 comparison failure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Radek Kanovsky <rk(at)dat(dot)cz>
Cc: pgsql-bugs(at)hub(dot)org
Subject: Re: float8 comparison failure
Date: 2000-07-28 15:16:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Radek Kanovsky <rk(at)dat(dot)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

In response to

pgsql-bugs by date

Next:From: Lutz BirkhahnDate: 2000-07-28 15:29:20
Subject: postgresql-7.0.2: install-sh cannot install pgaccess
Previous:From: Radek KanovskyDate: 2000-07-28 13:02:35
Subject: float8 comparison failure

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group