Search Postgresql Archives

Re: How to sum monetary variables

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

 



On 19/07/2011 6:04 AM, Merlin Moncure wrote:
I wouldn't even bother testing client implementations that are using floating point numbers to do the math -- they are going to be wrong. If you snoop around you should find math libraries that handle do a better job handling exact numbers for most popular languages.

You'll also need to convince your database interface to use the decimal library you choose, or get it to return 'numeric' types as strings so you can convert them with your chosen library yourself.

It'll do you no good to convert from Pg numeric -> floating point -> exact decimal library format.

--
Craig Ringer

POST Newspapers
276 Onslow Rd, Shenton Park
Ph: 08 9381 3088     Fax: 08 9388 2258
ABN: 50 008 917 717
http://www.postnewspapers.com.au/

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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