Re: rounding problems - Mailing list pgsql-general

From Craig Ringer
Subject Re: rounding problems
Date
Msg-id 4828BB98.9010100@postnewspapers.com.au
Whole thread Raw
In response to Re: rounding problems  (Justin <justin@emproshunts.com>)
Responses Re: rounding problems
Re: rounding problems
List pgsql-general
Justin wrote:
> I tried casting them to numeric and it was still wrong

How do the results differ from what you expect? You've posted a bunch of
code, but haven't explained what you think is wrong with the results.

Can you post a couple of SMALL examples and explain how the results are
different from what you expect them to be?

Try the example using the following formats for the literals in your test:

    2.0
    '2.0'::numeric      (this is a BCD decimal)
    '2.0'::float4         (this is a C++/IEEE "float")
    '2.0'::float8         (this is a C++/IEEE "double")

and see how the results differ.

--
Craig Riniger

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Making sure \timing is on
Next
From: David Fetter
Date:
Subject: Re: Making sure \timing is on