Re: Crazy Multiplication Issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: selurevad(at)yahoo(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Crazy Multiplication Issue
Date: 2005-04-03 00:13:30
Message-ID: 7008.1112487210@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Dave Horn" <selurevad(at)yahoo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2005-04-03 01:19:20 Re: PostgreSQL and .NET
Previous Message Paul Tillotson 2005-04-03 00:02:18 Re: getting information of tables and indexes