Re: float8 strtod weirdness - Mailing list pgsql-hackers

From Tom Lane
Subject Re: float8 strtod weirdness
Date
Msg-id 13542.1231340208@sss.pgh.pa.us
Whole thread Raw
In response to float8 strtod weirdness  ("Nikhil Sontakke" <nikhil.sontakke@enterprisedb.com>)
Responses Re: float8 strtod weirdness  (Sam Mason <sam@samason.me.uk>)
List pgsql-hackers
"Nikhil Sontakke" <nikhil.sontakke@enterprisedb.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


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: float8 strtod weirdness
Next
From: Kenneth Marshall
Date:
Subject: Re: float8 strtod weirdness