Re: The 85/0.0085 mistery ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: fwr(at)ga(dot)prestige(dot)net
Cc: "'Jean-Christophe Pazzaglia'" <jc(dot)pazzaglia(at)albourne(dot)com>, "'PostgreSQL-development'" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: The 85/0.0085 mistery ?
Date: 2000-10-06 14:58:58
Message-ID: 25365.970844338@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Frederick W. Reimer" <fwr(at)ga(dot)prestige(dot)net> writes:
> In general, it's recommended you don't check for exact equivalence when
> doing calculations on real numbers and instead check for "almost exactness."

Or use datatype NUMERIC, which behaves in a more intuitive way (at least
for people who are accustomed to thinking in decimal). But yes, exact
equality checks on float values are usually foolish.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-10-06 15:44:22 Re: The 85/0.0085 mistery ?
Previous Message Hannu Krosing 2000-10-06 14:36:30 Re: The 85/0.0085 mistery ?