Re: Crazy Multiplication Issue - Mailing list pgsql-general

From Tom Lane
Subject Re: Crazy Multiplication Issue
Date
Msg-id 7008.1112487210@sss.pgh.pa.us
Whole thread Raw
In response to Crazy Multiplication Issue  ("Dave Horn" <selurevad@yahoo.com>)
List pgsql-general
"Dave Horn" <selurevad@yahoo.com> writes:
> If I perform
> select col1 * col2, 213.1086 * .833 from tableA
> I get the following values
> 177.519464 and 177.583396

Works for me ... you *sure* it hasn't got something to do with the
datatypes you're using?  Specifically, float4 is only good to about
six digits, so the bogus result is unsurprising if any of the values
involved are float4.

            regards, tom lane

pgsql-general by date:

Previous
From: "Sean Davis"
Date:
Subject: Re: getting information of tables and indexes
Next
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL and .NET