Search Postgresql Archives

Re: rounding problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux