Re: float8 strtod weirdness

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nikhil Sontakke" <nikhil(dot)sontakke(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: float8 strtod weirdness
Date: 2009-01-07 14:56:48
Message-ID: 13542.1231340208@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Nikhil Sontakke" <nikhil(dot)sontakke(at)enterprisedb(dot)com> writes:
> Consider the following with latest CVS sources:

> postgres=# create table temp(val float4);
> CREATE TABLE
> postgres=# insert into temp values (415.1);
> INSERT 0 1
> postgres=# select * from temp where val = 415.1;

Anybody who works with float arithmetic can tell you that exact equality
tests are usually a bad idea.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2009-01-07 14:57:44 Re: float8 strtod weirdness
Previous Message Bruce Momjian 2009-01-07 14:47:07 Re: Multiplexing SUGUSR1